469,317 Members | 1,971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

SmtpMail.Send problems

I get various errors when I try to use email on the machine I have. XP
professional. It works fine on another machine with NT 2000 server. Below
is the code:

'BEGIN CODE
Dim oMail As New MailMessage()

With oMail
.From = "my**@baxglobal.com"
.To = "ce*****@baxglobal.com"
.Subject = "Test SMTP"
End With

SmtpMail.Send(oMail)
'END CODE

1) I receive the following error:
The "SendUsing" configuration value is invalid.

2) If I add
SmtpMail.SmtpServer = "localhost"

A) the SMTP server is stopped, I receive the following error:
The transport failed to connect to the server

B) the SMTP server is running, I receive the following error:
Unable to relay for ce*****@baxglobal.com

I can enable relaying for localhost, but is this necessary? Is there an
different way for it to be coded? Thanks in advance.
Nov 17 '05 #1
6 2180
Hi,

have you checked these:
http://www.asp.net/Forums/ShowPost.a...&PostID=268037
http://www.asp.net/Forums/ShowPost.a...1&PostID=25229

They should answer your question.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Cameron Eckman" <ce*****@baxglobal.com> wrote in message
news:OY**************@TK2MSFTNGP12.phx.gbl...
I get various errors when I try to use email on the machine I have. XP
professional. It works fine on another machine with NT 2000 server. Below is the code:

'BEGIN CODE
Dim oMail As New MailMessage()

With oMail
.From = "my**@baxglobal.com"
.To = "ce*****@baxglobal.com"
.Subject = "Test SMTP"
End With

SmtpMail.Send(oMail)
'END CODE

1) I receive the following error:
The "SendUsing" configuration value is invalid.

2) If I add
SmtpMail.SmtpServer = "localhost"

A) the SMTP server is stopped, I receive the following error:
The transport failed to connect to the server

B) the SMTP server is running, I receive the following error:
Unable to relay for ce*****@baxglobal.com

I can enable relaying for localhost, but is this necessary? Is there an
different way for it to be coded? Thanks in advance.

Nov 17 '05 #2
Within IIS's Internet Service Manager (ISM) console, check the SMTP virtual
mail server settings - specifically its property pages. Most likely you
will need to assign the IP address of the machine for the virtual smtp mail
server. By default, no address is specified.
Hope this helps.
--
Peter O'Reilly

Nov 17 '05 #3
Hello,

I am attempting to send email using an ASP.NET application running on
Windows Server 2003, and I'm getting the error message:

"The transport failed to connect to the server."

I have pretty much tried every suggestion I've found thus far and I
get this error no matter what I do. I did try using the CDOSYS test
from Microsoft as a test for the smtpserver, and it'll send that way.
Here's my existing code:

Public Sub SendMail()

Dim myMailMsg As New Mail.MailMessage()

With myMailMsg
.To = "<Send to address">
.From = <"Send From Address">
.Subject = "Test message"
.Body = "This is a test."
.BodyFormat = Mail.MailFormat.Text
End With

Mail.SmtpMail.SmtpServer = "<smtp server>"
Mail.SmtpMail.Send(myMailMsg)

End Sub

For my SmtpServer, I've used localhost, smarthost, the actual value of
our corporate smtp server address - nothing changes. I always get that
error message.

Can someone please help me?

Thanks,

James
"Teemu Keiski" <jo****@aspalliance.com> wrote in message news:<#n**************@tk2msftngp13.phx.gbl>...
Hi,

have you checked these:
http://www.asp.net/Forums/ShowPost.a...&PostID=268037
http://www.asp.net/Forums/ShowPost.a...1&PostID=25229

They should answer your question.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Cameron Eckman" <ce*****@baxglobal.com> wrote in message
news:OY**************@TK2MSFTNGP12.phx.gbl...
I get various errors when I try to use email on the machine I have. XP
professional. It works fine on another machine with NT 2000 server.

Below
is the code:

'BEGIN CODE
Dim oMail As New MailMessage()

With oMail
.From = "my**@baxglobal.com"
.To = "ce*****@baxglobal.com"
.Subject = "Test SMTP"
End With

SmtpMail.Send(oMail)
'END CODE

1) I receive the following error:
The "SendUsing" configuration value is invalid.

2) If I add
SmtpMail.SmtpServer = "localhost"

A) the SMTP server is stopped, I receive the following error:
The transport failed to connect to the server

B) the SMTP server is running, I receive the following error:
Unable to relay for ce*****@baxglobal.com

I can enable relaying for localhost, but is this necessary? Is there an
different way for it to be coded? Thanks in advance.

Nov 17 '05 #4
Hi,

http://www.asp.net/Forums/ShowPost.a...&PostID=268037

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"James" <dr*********@hotmail.com> wrote in message
news:63**************************@posting.google.c om...
Hello,

I am attempting to send email using an ASP.NET application running on
Windows Server 2003, and I'm getting the error message:

"The transport failed to connect to the server."

I have pretty much tried every suggestion I've found thus far and I
get this error no matter what I do. I did try using the CDOSYS test
from Microsoft as a test for the smtpserver, and it'll send that way.
Here's my existing code:

Public Sub SendMail()

Dim myMailMsg As New Mail.MailMessage()

With myMailMsg
.To = "<Send to address">
.From = <"Send From Address">
.Subject = "Test message"
.Body = "This is a test."
.BodyFormat = Mail.MailFormat.Text
End With

Mail.SmtpMail.SmtpServer = "<smtp server>"
Mail.SmtpMail.Send(myMailMsg)

End Sub

For my SmtpServer, I've used localhost, smarthost, the actual value of
our corporate smtp server address - nothing changes. I always get that
error message.

Can someone please help me?

Thanks,

James
"Teemu Keiski" <jo****@aspalliance.com> wrote in message

news:<#n**************@tk2msftngp13.phx.gbl>...
Hi,

have you checked these:
http://www.asp.net/Forums/ShowPost.a...&PostID=268037
http://www.asp.net/Forums/ShowPost.a...1&PostID=25229

They should answer your question.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Cameron Eckman" <ce*****@baxglobal.com> wrote in message
news:OY**************@TK2MSFTNGP12.phx.gbl...
I get various errors when I try to use email on the machine I have. XP professional. It works fine on another machine with NT 2000 server.

Below
is the code:

'BEGIN CODE
Dim oMail As New MailMessage()

With oMail
.From = "my**@baxglobal.com"
.To = "ce*****@baxglobal.com"
.Subject = "Test SMTP"
End With

SmtpMail.Send(oMail)
'END CODE

1) I receive the following error:
The "SendUsing" configuration value is invalid.

2) If I add
SmtpMail.SmtpServer = "localhost"

A) the SMTP server is stopped, I receive the following error:
The transport failed to connect to the server

B) the SMTP server is running, I receive the following error:
Unable to relay for ce*****@baxglobal.com

I can enable relaying for localhost, but is this necessary? Is there an different way for it to be coded? Thanks in advance.

Nov 17 '05 #5
Hi Teemu,

Thanks for replying, but as stated in my prior posting, I have already
tried those links with no resolution. Is there anything else I'm missing? I
even tried trapping the error (as a test, of course) to resume but I still
get the same message.

--
James Lankford

"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uS**************@tk2msftngp13.phx.gbl...
Hi,

http://www.asp.net/Forums/ShowPost.a...&PostID=268037

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"James" <dr*********@hotmail.com> wrote in message
news:63**************************@posting.google.c om...
Hello,

I am attempting to send email using an ASP.NET application running on
Windows Server 2003, and I'm getting the error message:

"The transport failed to connect to the server."

I have pretty much tried every suggestion I've found thus far and I
get this error no matter what I do. I did try using the CDOSYS test
from Microsoft as a test for the smtpserver, and it'll send that way.
Here's my existing code:

Public Sub SendMail()

Dim myMailMsg As New Mail.MailMessage()

With myMailMsg
.To = "<Send to address">
.From = <"Send From Address">
.Subject = "Test message"
.Body = "This is a test."
.BodyFormat = Mail.MailFormat.Text
End With

Mail.SmtpMail.SmtpServer = "<smtp server>"
Mail.SmtpMail.Send(myMailMsg)

End Sub

For my SmtpServer, I've used localhost, smarthost, the actual value of
our corporate smtp server address - nothing changes. I always get that
error message.

Can someone please help me?

Thanks,

James
"Teemu Keiski" <jo****@aspalliance.com> wrote in message news:<#n**************@tk2msftngp13.phx.gbl>...
Hi,

have you checked these:
http://www.asp.net/Forums/ShowPost.a...&PostID=268037
http://www.asp.net/Forums/ShowPost.a...1&PostID=25229

They should answer your question.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Cameron Eckman" <ce*****@baxglobal.com> wrote in message
news:OY**************@TK2MSFTNGP12.phx.gbl...
> I get various errors when I try to use email on the machine I have. XP > professional. It works fine on another machine with NT 2000 server.
Below
> is the code:
>
> 'BEGIN CODE
> Dim oMail As New MailMessage()
>
> With oMail
> .From = "my**@baxglobal.com"
> .To = "ce*****@baxglobal.com"
> .Subject = "Test SMTP"
> End With
>
> SmtpMail.Send(oMail)
> 'END CODE
>
> 1) I receive the following error:
> The "SendUsing" configuration value is invalid.
>
> 2) If I add
> SmtpMail.SmtpServer = "localhost"
>
> A) the SMTP server is stopped, I receive the following error:
> The transport failed to connect to the server
>
> B) the SMTP server is running, I receive the following error:
> Unable to relay for ce*****@baxglobal.com
>
> I can enable relaying for localhost, but is this necessary? Is
there an > different way for it to be coded? Thanks in advance.
>
>


Nov 17 '05 #6
Within IIS's Internet Service Manager (ISM) console, check the SMTP virtual
mail server settings - specifically its property pages. Most likely you
will need to assign the IP address of the machine for the virtual smtp mail
server. By default, no address is specified.
Hope this helps.
--
Peter O'Reilly

Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Edwin G. Castro | last post: by
2 posts views Thread by Leszek | last post: by
3 posts views Thread by aslantifosi | last post: by
9 posts views Thread by Russell Stevens | last post: by
3 posts views Thread by plex4r | last post: by
2 posts views Thread by joseph2000 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.