SmtpMail.Send problems

C

Cameron Eckman

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 = "(e-mail address removed)"
.To = "(e-mail address removed)"
.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 (e-mail address removed)

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

Peter O'Reilly

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.
 
J

James

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
 
J

James Lankford

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.
 
P

Peter O'Reilly

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top