SPWeb oWeb = SPContext.Current.Web
StringDictionary headers = new StringDictionary();
headers.Add("from", "system@domain.com");
headers.Add("to", spUser.Email);
headers.Add("subject", "Welcome to the SharePoint group: ABC site: ");
headers.Add("content-type", "text/html"); //This is the default type
System.Text.StringBuilder strMessage = new System.Text.StringBuilder();
strMessage.Append("<br><br><b>Login Instructions: </b><br>");
strMessage.Append("<font color='red'><UL><li>If you are a US employee ALWAYS login in using the following login format </font><br>");
SPUtility.SendEmail(web, headers,strMessage.ToString());
StringDictionary headers = new StringDictionary();
headers.Add("from", "system@domain.com");
headers.Add("to", spUser.Email);
headers.Add("subject", "Welcome to the SharePoint group: ABC site: ");
headers.Add("content-type", "text/html"); //This is the default type
System.Text.StringBuilder strMessage = new System.Text.StringBuilder();
strMessage.Append("<br><br><b>Login Instructions: </b><br>");
strMessage.Append("<font color='red'><UL><li>If you are a US employee ALWAYS login in using the following login format </font><br>");
SPUtility.SendEmail(web, headers,strMessage.ToString());
How can I add attachment in this case? I am using embed image concept and I need to embed an image in my email.
ReplyDeleteDid you try using < img > tag? having the image in the SharePoint site?
Delete