public static void SendEmail(string
strTo,string strSubject,string strBody)
{
try
{
StringDictionary headers = new StringDictionary();
headers.Add("to", strTo);
//headers.Add("cc","anil@test.com");
//headers.Add("bcc","narendra@test.com");
headers.Add("from","abhilash@test.com");
headers.Add("subject", strSubject);
headers.Add("content-type","text/html");
SPUtility.SendEmail(SPContext.Current.Web, headers, strBody);
{
try
{
StringDictionary headers = new StringDictionary();
headers.Add("to", strTo);
//headers.Add("cc","anil@test.com");
//headers.Add("bcc","narendra@test.com");
headers.Add("from","abhilash@test.com");
headers.Add("subject", strSubject);
headers.Add("content-type","text/html");
SPUtility.SendEmail(SPContext.Current.Web, headers, strBody);
//SPUtility.SendEmail(SPContext.Current.Web, true, false, strTo, strSubject, strBody);
}
catch (Exception ex)
{
Wipro.Novartis.Tablon.LoggingService.LogMessage(TablonConstants.LOG_CATEGORY, ex.StackTrace);
}
}
No comments:
Post a Comment