Monday, September 26, 2005

Email Exception Error

Email Error
Application_Error
String message = "Url " + Request.Path + " Error: " + Server.GetLastError().ToString();
MailMessage m = new MailMessage();
m.From ="me@mycompany.com";
m.To = "you@yourcompany.com";
m.Subject = "if you knew how to code, you wouldn't see this email";
m.Body = message;
SmtpMail.SmtpServer="127.0.0.1";
SmtpMail.Send( m );
Post a Comment