[ASP.NET C#]send mail message

http://forums.asp.net/t/1611143.aspx/1

Add reference dll for System.Net and System.Net.Mail to solution explorer.
Then You can use the following method helps to send mail message

using System.Net;
using System.Net.Mail;

public void MailSend()
{
string msgFrom = “test@abc.com“, msgTo = “test2@abc.com“, subject = “Hi", msgContent = “Good Morning";
MailMessage mMessage = new MailMessage();
MailAddress from = new MailAddress(msgFrom);
mMessage.From = from;

MailAddress messageTo = new MailAddress(msgTo);
mMessage.To.Add(messageTo);

mMessage.Subject = subject;
mMessage.Body = msgContent;

SmtpClient theClient = new SmtpClient(“");  //smtp server name
NetworkCredential authenticationInfo = new NetworkCredential(“","");  // smtp server userid & password
theClient.Credentials = authenticationInfo;
theClient.Send(mMessage);
authenticationInfo = null;
theClient = null;
}