I tried to change the FROM field with the name and email address. But when I receive the email, it is shown below
My network <commity@company.com [My network <commity@company.com]
Mycode is similar to below
const string from = "My network <commity@company.com>";
StringDictionary headers = new StringDictionary();
headers.Add("to", invitee.userEmail);
headers.Add("subject", ltEmailSubject.Text);
headers.Add("from", from);
headers.Add("content-type", MediaTypeNames.Text.Html);
_emailSuccessful = SPUtility.SendEmail(elevatedSite.RootWeb, headers,
emailBody + Environment.NewLine + "");
I want the FROM email address to be displayed as below
My network [commity@company.com]
source
share