Differenciate or distinguish between outlook attachment and embedded image/signature using property accessor in C#.NET
These days, outlook emails are composed in three formats; plain text, html and rtf (rich text format). If an email is in rtf and it has attachments, as well as, embedded image or signature, it poses a problem in outlook automation. When you are reading attachments in an outlook automation program, your program will recognize the embedded image/signature as an attachment. Although, it is not an attachment from the sender. So, you need to apply some sort of filtering in your loop. Here it is…… using System;
using System.Collections.Generic;
using Outlook = Microsoft.Office.Interop.Outlook;
using System.IO; Outlook.MailItem item = null;
Outlook.PropertyAccessor prop; // intialize item to a mail item
foreach (Outlook.Attachment atmt in item.Attachments)
{
prop = atmt.PropertyAccessor; string contentID = (string)prop.GetProperty(“http://schemas.microsoft.com/mapi/proptag/0x3712001E“); if (contentID != “”)
continue; else //do something ; } If the ContentID is not found, it is not an actual attachment, rather an embedded image/signature.
Differenciate or distinguish between outlook attachment and embedded image/signature using property accessor in C#.NET的更多相关文章
- [VSTO] 区分MAILITEM的ATTACHMENT是真正的附件还是内嵌资源
在遍历MailItem的Attachments集合的时候发现,不管是真正的附件还是内嵌资源,比如邮件内容中内嵌的图片(Embedded Image),都是Attachments集合的元素,通过查看at ...
- [转]Extending the User Interface in Outlook 2010
本文转自:https://msdn.microsoft.com/en-us/library/office/ee692172%28v=office.14%29.aspx#OfficeOLExtendin ...
- [转]C#操作Outlook
本文转自:https://blog.csdn.net/yanlovehan/article/details/8500449 //引用Microsoft.Office.Interop.Outlook.d ...
- [转]Creating a custom ribbon for Outlook 2013, 2010 and toolbar for Outlook 2007, 2003 – C# sample
本文转自:https://www.add-in-express.com/creating-addins-blog/2013/05/21/outlook-ui-customization-ribbons ...
- C#.NET开源项目、机器学习、商务智能
所以原谅我,不能把所有的都发上来,太杂了,反而不好. 1..NET时间周期处理组件 这个组件很小,主要是对时间日期,特别是处理时间间隔以及时间范围非常方便.虽然.NET自带了时间日期的部分功能,但可能 ...
- nutch-default.xml文件
Nutch中的所有配置文件都放置在总目录下的conf子文件夹中,最基本的配置文件是conf/nutch-default.xml.这个文件中定义了 Nutch的所有必要设置以及一些默认值,它是不可以被修 ...
- iOS开发——高级技术&签名机制
签名机制 最近看了objc.io上第17期中的文章 <Inside Code Signing> 对应的中文翻译版 <代码签名探析> ,受益颇深,对iOS代码签名机制有了进一步的 ...
- emWin使用外部SRAM的方法
我用的是stm32,加了1MB的外部SRAM,在使用emWin的时候,将一部分内存分配给emWin使用.其实方法很简单,传入SRAM数据总线地址即可,数据位宽我采用16bit,因为使用的SRAM是16 ...
- Android 应用接入广点通统计API 方案
官方给你参考文档,很扯淡,是c++和python脚本: 安卓java代码接入如下: package com.edaixi.util; import java.io.UnsupportedEncodin ...
随机推荐
- Python“函数式编程”中常用的函数
1.map(func,seq[,seq,...]) 对序列中的每个元素应用函数,python2中map()返回的是列表,python3中返回的是迭代器,可以用list()转换成列表.以下例子为pyth ...
- 使用HBuilder+MUI+Flask后端服务器框架+Mongodb数据库开发手机APP
1.开发准备HBuilder: 1.下载安装HBuilder2.创建APP项目 3.代码示例: <!doctype html> <html lang="en"&g ...
- 20175204 张湲祯 2018-2019-2《Java程序设计》第四周学习总结
20175204 张湲祯 2018-2019-2<Java程序设计>第四周学习总结 教材学习内容总结 -第五章子类与继承要点: -子类与父类: 1.通过使用关键字extends来定义一个类 ...
- VOC2012数据集注解
VOC2012官网介绍:http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html 分割部分:参考博客:https://blog.csdn.ne ...
- anaconda3安装cv2模块(python3.6)
- 数位dp 的简单入门
时间紧张,就不讲那么详细了. 之前一直被深搜代码误解,以为数位dp 其实就是记忆化深搜...(虽说爆搜确实很舒服而且还好想) 但是后来发现数位dp 的标准格式其实是 预处理 + dp ...... 数 ...
- html5 - 地图
demo截图: demo链接 代码: <!DOCTYPE html> <html lang="en"> <head> <meta char ...
- gitlab+PHP 自动部署设计方案
2018-9-26 14:00:39 星期三 场景: 由于某种情况, 不能使用Jenkins, so......只有自己实现了 看图: webUI 设计方案, - 文件夹A, 用来存放git分支- 文 ...
- AD证书导入文档(单向认证)
AD证书或者SSL证书导入的方法步骤(在root用户下操作) 1. 将证书命名为AD-PRO.cer,并确定证书的颁发. 2. 将/app/ad_cert/keystore下的原有证书删除掉和文件 ...
- MySQL学习笔记:timediff、timestampdiff、datediff
一.时间差函数:timestampdiff 语法:timestampdiff(interval, datetime1,datetime2) 结果:返回(时间2-时间1)的时间差,结果单位由interv ...