如何使用内嵌附件发送ews电子邮件以进行请求的交换服务器版本Exchange2007_SP1
问题描述:
由于Attachment.IsInline属性不受支持交换服务器版本Exchange2007_SP1,有没有办法发送内联附件?如何使用内嵌附件发送ews电子邮件以进行请求的交换服务器版本Exchange2007_SP1
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);
创建的对象将不支持