System.Net.Mail.MailMessage msgMail = new System.Net.Mail.MailMessage("xxxx@xxxxx.com", txtEmail.Text); string mailid = "xxxx@bexxxx.com"; string Pasword = xxxxx; string msg = null; string mTo = To; string mFrom = mailid; msgMail.Subject = Registration Confirmation; System.Text.StringBuilder SB = new System.Text.StringBuilder(); System.IO.StringWriter Sw = new System.IO.StringWriter(SB); string mMsg = "hi" mMsg = mMsg + SB.ToString(); try { msgMail.To.Add(mTo); msgMail.From = new System.Net.Mail.MailAddress(mFrom); msgMail.IsBodyHtml = true; msgMail.Body = mMsg; msgMail.Priority = System.Net.Mail.MailPriority.High; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(); smtp.Host = "mymail.brinkster.com"; smtp.Port = 25; smtp.Credentials = new System.Net.NetworkCredential(mFrom, Pasword); smtp.EnableSsl = true; smtp.Send(msgMail); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)