Author: aliusmankhan | Posted on: 12/3/2008 1:26:29 AM | Views : 321

Dear Friends
I was searching for the "How to send Email using asp.net (C#)". But i was unable to get the proper solution.
Basically i I am doing.... 
try {
MailMessage MSG = new MailMessage();
MSG.BodyFormat = MailFormat.Text;
MSG.To = "EmailID@gmail.com";
MSG.From = "aliusmankhan";
MSG.Subject = "Welcome to Our site";
MSG.Body = "This message is to inform u that u r active member of our site";
SmtpMail.SmtpServer = "mail.google.com";
SmtpMail.Send(MSG);
}
catch (Exception E) {
Response.Redirect("ErrorPage.aspx");
}  

But it gives me the Error on Error page i,e. "The transport failed to connect to the server."

...

Go to the complete details ...