using System.Web.Mail;
public void SendMail()
{
MailMessage mail = new MailMessage();
mail.To = "tuemail@hotmail.com";
mail.From = txtmail.Text;
mail.Subject = txtasunto.Text;
mail.BodyFormat = MailFormat.Text;
mail.Body =txtbody.Text;
SmtpMail.SmtpServer="tu servidor smtp";
try
{
SmtpMail.Send(mail);
lblerror.Text="Mensaje enviado Satisfactoriamente";
}
catch(Exception ex)
{
lblerror.Text="ERROR: " + ex.Message;
}
}