473,466 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2431
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. ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.