How to send HTML email from Sharepoint with CC/BCC
public static void SendEmail(SPWeb web, string toEmail, string ccEmail,
string bccEmail,
string subject, string body)
{
if (!string.IsNullOrEmpty(toEmail))
{
StringDictionary headers = new StringDictionary
{
{"to", toEmail},
{"cc", ccEmail},
{"bcc", bccEmail},
{"subject", subject},
{"content-type", "text/html"}
};
SPUtility.SendEmail(web, headers, body);
}
}
0 comments:
Post a Comment