Subhash Sharma

Subhash Sharma
Subhash Sharma

This is Subhash Sharma(Software Engineer) Blog

Welcome to this blog and find every solution.............

Search This Blog

Software Engineer(Subhash Sharma)

Software Engineer(Subhash Sharma)
Software Engineer

Saturday, March 13, 2010

Email Send

using System.Net.Mail;

private void btnSend_Click(object sender, EventArgs e)
{
MailAddress mailTo = new MailAddress(txtAddress.Text);
MailAddress mailFrom = new MailAddress(txtFrom.Text);
MailMessage message = new MailMessage(mailFrom, mailTo);
message.Subject = txtSubject.Text;
message.Body = txtMessage.Text;
message.Priority = MailPriority.High;
SmtpClient c = new SmtpClient("ServerName");
c.Send(message);
}


}

No comments:

Post a Comment