本文介绍了EmailMessage.Attachment.EmbeddedMessage.MimeDocument为null - 为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 在传输处理程序(SubmittedMessageEventHandler)中处理MailItem时,可以使用.Attachments集合轻松访问附件:When processing a MailItem in a transport handler (SubmittedMessageEventHandler) attachments can easily be accessed using the .Attachments collection: foreach (附件附件 myEmailMessage.Attachments) { ...foreach(Attachment attachment in myEmailMessage.Attachments) { ... 推荐答案我最近碰到了这个。我通过首先检查附件实例的.MimePart.IsEmbeddedMessage属性来处理它,然后(如果这是真的),在附件实例上调用.GetContentReadStream()并将返回的流传递给EmailMessage.Create()。您应该能够从生成的EmailMessage实例中获取您想要的内容。I ran into this recently. I handled it by first checking the attachment instance's .MimePart.IsEmbeddedMessage property, then (if that was true), calling .GetContentReadStream() on the attachment instance and passing the returned stream to EmailMessage.Create(). You should be able to get what you're going for from the resulting EmailMessage instance. 这篇关于EmailMessage.Attachment.EmbeddedMessage.MimeDocument为null - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 05-28 07:54