Tuesday, April 15, 2014

Send email with CC and BCC using SPUtility in SharePoint

When i am searching for options to send CC/BCC using SharePoint's SPUtility class, i came across this code. Thought of sharing in my blog which might be helpful for any one



StringDictionary headers = new StringDictionary();
headers.Add(“to”, sendTo);
headers.Add(“cc”, “”);
headers.Add(“bcc”, “”);
headers.Add(“from”, “admin@test.com“);
headers.Add(“subject”, “Testing”);
headers.Add(“content-type”, “text/html”);
SPUtility.SendEmail(web,headers, Body);



share your comments/feedback if any.

thank you :)

No comments:

Post a Comment