簡體   English   中英

如何為請求的Exchange Server版本Exchange2007_SP1發送帶內嵌附件的ews電子郵件

[英]How to send ews email with inline attachments for requested exchange Server Version Exchange2007_SP1

由於Exchange Server版本Exchange2007_SP1不支持Attachment.IsInline屬性,因此可以發送嵌入式附件嗎?

string file = @"C:\Temp\Party.jpg";
    message.Attachments.AddFileAttachment("Party.jpg", file);
    message.Attachments[0].IsInline = true;
    message.Attachments[0].ContentId = "Party.jpg";

在創建交換服務的對象時,請選擇高於Exchange2007_sp1的任何版本,例如:

ExchangeService exchange = new ExchangeService(ExchangeVersion.Exchange2010); // Exchange2010_sp1, Exchange2013 etc.

如果使用Exchange2007_sp1創建,則不支持以下對象的嵌入式附件

ExchangeService objInlineNotSupportedExchange= new ExchangeService(ExchangeVersion.Exchange2007_SP1);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM