473,243 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,243 software developers and data experts.

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 2421
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Edwin G. Castro | last post by:
I'm using the System.Web.Mail.SmtpMail class to send email from an app I wrote. I needed to install IIS to get it to send the messages even though I wanted to use an existing SMTP server. Anyway, I...
2
by: Leszek | last post by:
Hello, I have created a simple code to send emails using the MailMessage class and the SmtpMail.Send() method: MailMessage mail = new MailMessage(); mail.From = echidna@somewhere.com; //...
1
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
3
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
3
by: aslantifosi | last post by:
hi all, My question is about that i use a smpt server which is running on a different machine from my webserver machine. And i can authenticate with a user and password. I use SmtpMail class. i...
9
by: Russell Stevens | last post by:
I generate pdf files on my server and allow users to access them via a browser and also email them. Most files work fine whether the user uses his browser or gets an email with a pdf attachment...
3
by: plex4r | last post by:
I want to add guaranteed delivery (or at least guarantee sent) to some code using SmtpMail.Send(). The method is void. Does Send() throw exceptions if it cannot connect to the Smtp server or has...
2
by: joseph2000 | last post by:
Hi, I have problem with e-mails which are being send via System.Web.Mail.SmtpMail class but before describing the problem itself first I'd like to show shortly what I'm doing on the server. ...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.