help: problem with System.Web.Mail

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
 
K

Kevin Spencer

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

hb

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
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top