hi,
create a button and use this code...i think it will usefull to u
protected void
Button3_Click(object sender, EventArgs e)
{
String to = "Tomailid@gmail.com";
SmtpClient SmtpServer = new
SmtpClient();
String message="your message in body";
SmtpServer.Credentials = new System.Net.NetworkCredential("yourmailid@gmail.com
", "password");
SmtpServer.Port = 587;
SmtpServer.Host = "smtp.gmail.com";
SmtpServer.EnableSsl = true;
MailMessage mail = new
MailMessage();
try
{
mail.From = new MailAddress("yourmailid@gmail.com", "Subject", System.Text.Encoding.UTF8);
// mail.To.Add(new MailAddress(to));
mail.To.Add(new MailAddress(t));
// mail.Subject = subject;
mail.Body = message;
mail.IsBodyHtml = true;
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
SmtpServer.Send(mail);
}
catch (Exception
err)
{
}
}