如何使用Microsoft.Exchange.WebServices.Data托管API通过多行主体发送消息? [英] How to send message with multi-line body with Microsoft.Exchange.WebServices.Data Managed API?

查看:99
本文介绍了如何使用Microsoft.Exchange.WebServices.Data托管API通过多行主体发送消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Microsoft.Exchange.WebServices.Data托管API通过多行主体发送消息?如果可能,也请共享代码.

How to send message with multi-line body with Microsoft.Exchange.WebServices.Data Managed API? Please share the code also if possible.

推荐答案

如果IsBodyHtml设置为true,则设计可能会忽略标准换行符.您也可以尝试将IsBodyHtml设置为false并确定在该实例中换行符是否起作用,但是,除非您将其明确设置为true,否则我很确定它还是默认为false.

这是示例代码:

If IsBodyHtml is set to true then a standard newline could potentially be ignored by design. You may also just try setting IsBodyHtml to false and determining if newlines work in that instance, although, unless you set it to true explicitly I''m pretty sure it defaults to false anyway.

Here is the sample code:

var message = new System.Net.Mail.MailMessage();
message.Body = "First Line <br /> second line";


这篇关于如何使用Microsoft.Exchange.WebServices.Data托管API通过多行主体发送消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆