help: problem with System.Web.Mail

  • Thread starter Thread starter hb
  • Start date Start date
H

hb

Hi,

Yesterday I applied an automatic Windows security update from Microsoft.
Then, none of my web application can send out email using
System.Web.Mail.SmtpMail.Send();

I don't see any errors. It just does not send the email.

The to and from address are valid email addresses.

I don't know what kind of Windows security update was installed and how
to rollback to the previous status. My OS is Windows 2000 Standard Server.
The web applications are written in ASP.Net(C#) using Visual Studio.Net
2003.

Would you please tell me what could be the cause of the problem?

Thank you

hb
 
Check the security settings of your SMTP server, particularly the relay
settings.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
Hi, Kevin,

In the relay setting of SMTP server, "All except the list below" is checked
and there is no list there. But the following code still can not send out
email
and no error occurs:
==
using System;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Mail;
using System.Web.Util;

namespace GoodEnergyCom
{
public class test1 : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();
msg.To="(e-mail address removed)";
msg.From="(e-mail address removed)";
msg.Subject="test mail";
msg.BodyFormat = MailFormat.Html;
msg.Body = "test from good offices";
System.Web.Mail.SmtpMail.SmtpServer="localhost";
System.Web.Mail.SmtpMail.Send(msg);
msg = null;
Response.Write("email sent ok<br>");
}
}
}
==

Do you have any ideas about the problem?

hb
 
Back
Top