I was trying to change FROM field with Name and Email address. But When I get email It is comaing like below
My network <[email protected] [My network <[email protected]]
Mycode is like below
const string from = "My network <[email protected]>";
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 FROM email address should showup like below
My network [[email protected]]