SMTP send e-mail

G

Guest

I know there are lots of threads covering my question but i am still unable
to send e-mails from an asp.net page. Messages are not even going into the
logs.

Here is the code that i am using to send the e-mail.

MailMessage objMail = new MailMessage();
objMail.From = "nigel@***";
objMail.To = nigel@***;
objMail.Subject = txtSubject.Text;
objMail.BodyFormat = MailFormat.Html;
objMail.Body = "Text"
SmtpMail.SmtpServer = "127.0.0.1";
SmtpMail.Send(objMail);

The error that i am getting is

System.Runtime.InteropServices.COMException: The message could not be sent
to the SMTP server. The transport error code was 0x800ccc15. The server
response was not available

Line 22: SmtpMail.Send(objMail);

The server is a Windows 2003 running iis 6.0 and smtp. I have set the realy
to 127.0.0.1 but to no avail.

One thing that i have noticed is that i cannot telnet to port 25. I have no
firewall enabled yet and no antivirus.

Does anyone have any suggestions?

Thanks in advance

Nigel
 
J

John Timney \( MVP \)

I would hazard a guess that your expecting your smtp instance to handle your
email - but your local SMTP is not an SMTP gateway, only a forwarding device
to a gateway like an exchange server or ISP email server on port 25. That
would explain why you cant get a response from port 25.

Cant remember the exact details - but you need to try setting the smart host
option of your smtp under IIS to point to an accesible smtp server.
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top