Hi, Being a learner. I am here to participate just like other Development Blogs to enhance my knowledge regarding AspNet Programming & I would like to know that "how Send an E-mail from an ASP.NET application", which has become difficult to debug. I hope any tech developer help me in resolving this issue. Some code i have tried.

MailMessage mailMess = new MailMessage ();
mailMess.From = "abc@gmail.com";
mailMess.To = "xyz@gmail.com";
mailMess.Subject = "Test email";
mailMess.Body = "Hi This is a test mail.";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send (mailMess);