我试图用名称和电子邮件地址更改 FROM 字段。但是当我收到电子邮件时,它显示如下
My network <commity@company.com [My network <commity@company.com]
Mycode如下
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 + "");
我想要 FROM 电子邮件地址应该如下所示
My network [commity@company.com]