SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); try { StringBuilder sb = new BAL.PageContent().EmailList(); string s = sb.ToString().Trim().TrimEnd(','); MailAddress fromAddress = new MailAddress("info@captorsolutions.com"); message.From = fromAddress;//here you can set address message.To.Add(s); message.Subject = "Aghoryan Email Notification";//subject of email // message.CC.Add("cc@site.com");//ccing the same email to other email address //message.Bcc.Add(new MailAddress("bcc@site.com"));//here you can add bcc address message.IsBodyHtml = true;//To determine email body is html or not message.Body = string.Format("<html><body>" + ucEditor1.Content + "</body></html>"); smtpClient.Send(message); } catch (Exception ex) { //throw exception here you can write code to handle exception here } }
message.IsBodyHtml
message.Body = string.Format(ucEditor1.Content);
img
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)