System.Web.Mail in c# framework 2

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi

i have a problem.
i'm using the following code.
try
{
System.Web.Mail.MailMessage msg = new
System.Web.Mail.MailMessage();
msg.From = "fromaddress";
msg.To = "toaddress";
msg.Body = "body";
msg.Subject = "subject";
System.Web.Mail.SmtpMail.SmtpServer = "serveraddres";
System.Web.Mail.SmtpMail.Send(msg);
}
catch(Exception ex)
{
//do nothing
}

in earlyer versions (framework bevor 2) it works fine, when there the
is no connection to the server nothing happens because of the catch.

in framework 2 there was no exception.
the process accroach 99% of the processor. i can't kill him about the
task manager.

i must restart the system.

can someone acknowledge the fact?

thx tim

.


Quantcast