SmtpMail.Send not working. Held in Mailroot/Queue folder.

R

rh

I am not able to send email using SmtpMail.Send. I imagine that it is a
configuration issue. I see that the emails that I attempt to send are in the
Mailroot/Queue folder but they never actually get sent. I have an anti-virus
program that I disabled but it still doesn't work.

I also know that we have a spam filtering program called AppRiver SpamLab.
Could it be this?

Any suggestions? Thanks.
 
C

Cor Ligthert

RH,

Some parts of your message bring me in doubt that you are using Smtp mail.
Can you show a little piece of code.

Cor
 
R

rh

Thanks for any assistance. Here is part of the code:

Dim loMail As New MailMessage()

loMail.From = "(e-mail address removed)"

loMail.To = "(e-mail address removed)"

loMail.Subject = "Test Email Subject"

loMail.Body = "Test Email Body"

loMail.BodyFormat = MailFormat.Html

SmtpMail.SmtpServer = "localhost"

SmtpMail.Send(loMail)
 
C

Cor Ligthert

Rh,

That "localhost" is has to be an mailserver by instance IIS mailserver.

In this situation it will work only on your test environment when you have a
mailserver installed on that.

It has to be an dns name or an ip adres from a real smtp mailserver.

Cor
 
R

rh

Here is more info: I just checked the Event Viewer-->System and it show a
Warning that says:

"Message delivery to the remote domain 'yahoo.com' failed for the following
reason: The remote server did not respond to a connection attempt."
 
J

Jared Tullis

I know you already have this solved, but for others out there who might be
experiencing the same trouble, a little more info:

I am going under the assumption here that maybe you are using an ISP who
blocks direct SMTP connections.

When you were using Localhost, you said it got to your mail queue, so that
means the local IIS SMTP host is indeed up and running. IIS can only
deliver how it is configured to deliver, so without a smart host, IIS will
attempt direct delivery. In other words, if you send a message to
yahoo.com, IIS will attempt an outbound connection on port 25 (SMTP)
directly to Yahoo!'s mail servers. As soon as you put in your ISP's mail
server into SmtpMail.SmtpServer, it started connecting through your ISP and
thus the email got through. The other alternative in this scenario is to
configure IIS to use your ISP as a smart host (in Internet Services Manager,
right click Default SMTP Virtual Server, hit properties and under the
advanced button on the delivery tab, you can put your ISP's mail server in
that box.

HTH
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top