用javascript格式化的邮件正文html

时间:2016-07-01 13:40:44

标签: javascript c# asp.net outlook

var theApp = new ActiveXObject("Outlook.Application");     
var theMailItem = theApp.CreateItem(0);
theMailItem.To = to;
theMailItem.Subject = (subject);
theMailItem.CC = carbon;
theMailItem.Body = (msg);    
theMailItem.display();

我正在使用上面的javascript代码通过outlook发送电子邮件一切正常,但邮件的主体不是HTML格式的,有人可以帮我这个。提前致谢

1 个答案:

答案 0 :(得分:0)

不是设置纯文本Body属性,而是将HTMLBody属性设置为格式正确的HTML字符串。

相关问题