本文介绍了如何知道附件是否是Outlook电子邮件中的签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Outlook电子邮件,我需要处理它的附件.但是在遍历附件时,如果附件是签名,我想跳过它.

I have an Outlook email and i need to process it's attachments. But when iterating thru the attachments, if the attachment is a signature i want to skip it.

要知道附件是否是我正在使用的签名,

To know if the attachment is a signature i am using:

outlookMailItem.Attachments[i].PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001E");

但是我收到了Outlook安全警报.

But i am getting an Outlook security alert.

还有另一种使用安全代码的方式吗?可以使用兑换来完成吗?

Is there another way using a safer code? Can it be done using Redemption?

谢谢您的时间.

推荐答案

PR_ATTACH_CONTENT_ID属性很好地表明附件是嵌入式图像,但是有些附件设置了PR_ATTACH_CONTENT_ID属性,但未嵌入图像(Lotus Notes喜欢在所有附件上设置PR_ATTACH_CONTENT_ID).即使未设置PR_ATTACH_CONTENT_ID,Outlook也可以使用PR_ATTACH_CONTENT_LOCATIONPR_ATTACH_LONG_FILENAME加载嵌入式图像.唯一真正的测试是解析HTML正文,并找出哪些<img>标签引用了附件.兑换将使您可以使用 RDOAttachment .字段中,您还可以使用 RDOAttachment .Hidden属性,它会跳几圈以确定附件是否为嵌入式图像,而不是真实"附件.

PR_ATTACH_CONTENT_ID property is a good indication that an attachment is an embedded image, but there are attachments that have PR_ATTACH_CONTENT_ID property set, but they are not embedded images (Lotus Notes likes to set PR_ATTACH_CONTENT_ID on all attachments).Even if PR_ATTACH_CONTENT_ID is not set, Outlook can use PR_ATTACH_CONTENT_LOCATION or PR_ATTACH_LONG_FILENAME to load an embedded image.The only real test is to parse the HTML body and figure out which <img> tags refer to the attachments.Redemption will let you access that property using RDOAttachment.Fields, you can also use RDOAttachment.Hidden property, which jumps through a few hoops to figure out whether an attachment is an embedded image and not a "real" attachment.

这篇关于如何知道附件是否是Outlook电子邮件中的签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 18:52