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);
}
}
Saturday, March 13, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment