因为不支持Attachment.IsInline属性交换服务器版本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";
答案 0 :(得分:0)
当您创建交换服务对象时,请选择任何高于Exchange2007_sp1的版本:
ExchangeService exchange = new ExchangeService(ExchangeVersion.Exchange2010); // Exchange2010_sp1, Exchange2013 etc.
如果使用Exchange2007_sp1
创建,则不支持以下对象的内联附件ExchangeService objInlineNotSupportedExchange= new ExchangeService(ExchangeVersion.Exchange2007_SP1);