纯文本和html格式的Outlook代码

时间:2016-04-27 04:11:37

标签: vb.net email outlook

有些人建议最好在同一个电子邮件正文中以html格式和纯文本格式发送电子邮件,如下面的链接所解释的那样。 https://litmus.com/blog/reach-more-people-and-improve-your-spam-score-why-multi-part-email-is-important

您可以在下面看到四个代码选项。

.BodyFormat = Outlook.OlBodyFormat.olFormatHTML
.BodyFormat = Outlook.OlBodyFormat.olFormatPlain
.BodyFormat = Outlook.OlBodyFormat.olFormatRichText
.BodyFormat = Outlook.OlBodyFormat.olFormatUnspecified

您可以选择一个选项,如下图所示。 http://www.rocketseed.com/wp-content/uploads/2013/07/Outlook-2010-HTML.jpg

如何发送混合格式的电子邮件,即使您的代码必须包含一个选项?

我需要vb.net代码。

1 个答案:

答案 0 :(得分:0)

该链接不适用于Outlook:当保存(或发送)消息时,所有3种消息体(plain,HTML,RTF)都会同步。您无法从Outlook发送邮件,其中任何一种风格都不同步。您可以发送纯文本消息,html / plain或RTF(winmail.dat),但不能发送纯文本正文与HTML正文不同步。