for Send Mail it good :
i think you want to send mail by mail message
than you can used following.
your smtp code write as usual.
var smtp = new System.Net.Mail.SmtpClient();
{
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
smtp.Timeout = 20000;
}
than you write
MailMessage mailObj = new MailMessage();
mailObj.Priority = MailPriority.High;
MailAddress mailfrom = new MailAddress(addFrom, UserName);
mailObj.From = mailfrom;
MailAddress mailadTo2 = new MailAddress(txtEmailTo);
mailObj.To.Add(mailadTo2);
mailObj.Subject = txtSubject;
mailObj.IsBodyHtml = true;
mailObj.Body = Body;
smtp.Send(mailObj);
it send mail i hope you want it if not than send comments.]