我有一个通过Exchange Web服务发送电子邮件的程序:
//EXCHANGE API
using Microsoft.Exchange.WebServices;
using Microsoft.Exchange.WebServices.Data;
//BODY
string mBody = "<strong>TEXT</strong> Test";
//SETUP
ExchangeService service = new ExchangeService();
service.Url = new Uri("https://"+uriVar);
service.Credentials = new WebCredentials(userNameVar, passwordVar);
EmailMessage message = new EmailMessage(service);
message.Subject = mSubject;
message.Body = new MessageBody(BodyType.HTML,mBody);
message.ToRecipients.Add(recipient);
message.Save();
//Adding Image(s)
string fileFacebook = "facebook.png";
message.Attachments.AddFileAttachment("facebook.png", fileFacebook);
message.Attachments[0].IsInline = true;
message.Attachments[0].ContentId = "imgFacebook";
//Send
message.Send();
(图像添加到原始主体中,而不是在此示例中)
然而,电子邮件以纯文本形式通过,我找不到原因。我很确定它已经工作了一段时间,是否有可能在服务器上发生了某些变化?如果是这样,它会是什么?