mail sender


SUBMITTED BY: Guest

DATE: Nov. 21, 2013, 12:06 a.m.

FORMAT: Text only

SIZE: 508 Bytes

HITS: 745

  1. MailMessage mlmsg = new MailMessage();
  2. mlmsg.From = new MailAddress(this.txtFrom.Text);
  3. mlmsg.To.Add(this.txtTo.Text);
  4. mlmsg.Subject = txtSubject.Text;
  5. mlmsg.Body = this.richTextMSG.Text;
  6. SmtpClient Sclt = new SmtpClient(comboBox1.Text, 587);
  7. Sclt.Credentials = new NetworkCredential(txtFrom.Text, txtMdp.Text);
  8. Sclt.EnableSsl = true;
  9. Sclt.Send(mlmsg);

comments powered by Disqus