Wednesday, February 4, 2015

Sending Email Sharepoint 2010

Calling Method: 
emailFrom you can give any emailID
 
SendEmail(subject, body, true, champions, string.Empty, string.Empty, SPContext.Current.Site.RootWeb, emailFrom);
 
Method:
public static void SendEmail(string subject, string body, bool isBodyHtml, string receiverEmail,
                                    string cc, string bcc, SPWeb web,string from)
        {
            StringDictionary headers = new StringDictionary();
 
            headers.Add("to", receiverEmail);
            headers.Add("cc", cc);
            headers.Add("bcc", bcc);
            headers.Add("from", from);
            headers.Add("subject", subject);
            headers.Add("content-type""text/html");
            headers.Add("fAppendHtmlTag""true");
            headers.Add("fHtmlEncode""true");
            SPUtility.SendEmail(web, headers, body.ToString());

No comments:

Post a Comment

Image noise comparison methods

 1. using reference image technique     - peak_signal_noise_ratio (PSNR)     - SSI 2. non-reference image technique     - BRISQUE python pac...