2

也许 Outlook 只是将其格式化为 Outlook 希望它的外观,bc 代码对我来说看起来不错,也许你们中的一个大师可以告诉我如何添加回车(让下一个以前的雇主出现在下一行)

Outlook.Application oApp = new Outlook.Application();
Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem         
(Outlook.OlItemType.olMailItem);                
string content = string.Empty;
string content = previousEmployer + Environment.NewLine;
//I have also tried this to no avail
//string content = previousEmployer + "\n";
oMsg.HTMLBody = content;
Outlook.Recipients oRecips = (Outlook.Recipients)oMsg.Recipients;
Outlook.Recipient oRecip = (Outlook.Recipient)oRecips.Add("alphaomegaentry.com");
oRecip.Resolve();
oMsg.Save();
oRecip = null;
oRecips = null;
oMsg = null;
oApp = null;
4

1 回答 1

3

如果HTMLBody 确实需要包含 HTML,你可以试试这个:

string content = string.Format("{0}<br />", previousEmployer);
oMsg.HTMLBody = content;
于 2013-10-29T14:54:42.897 回答