为什么在删除附件后,附件仍然在导出的.eml文件中?
GetItemResponse i;
EmailMessage item = (EmailMessage)i.Item;
item.Attachments.Clear();
item.Update(ConflictResolutionMode.AlwaysOverwrite);
string filename = $"{item.Subject}.eml";
using (var fileStream = new FileStream($@"C:\{filename}", FileMode.Create))
{
fileStream.Write(item.MimeContent.Content, 0, item.MimeContent.Content.Length);
}