I Write code to send e-mail from an ASP.NET application..Is this correct for that or need some changes..any changes in the code will be happilly acceptable..
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);
I am beginner in this field recently join Online Dot Net training course so I want to clear my doubt