Saturday, March 31, 2012

smtp

Hi,

I'm using smtp default server on win xp. I've added relay access of 127.0.0.1. I'm using the following code:

<code>

using System.Web.Mail;

// Create message

MailMessage msgMail =new MailMessage();

// Set message properties

msgMail.From = txtFrom.Text;

msgMail.To = txtTo.Text;

msgMail.Subject = txtSubject.Text;

msgMail.Body = txtMessage.Text;

// Send message

SmtpMail.SmtpServer="localhost";

SmtpMail.Send(msgMail);

// Clear form fields

txtTo.Text = "";

txtSubject.Text = "";

txtMessage.Text = "";

// Show success

litStatus.Text = "<p>Message sent</p>";

</code>

but I get the error

The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available

Has anyone seen this before?

Thanks

Do you have McAfee or Norton anti-virus or "Internet Security" things installed on your computer?

0 comments:

Post a Comment