如何将ItemAttachment的内容加载到文件中? [英] how to load the content of an ItemAttachment into a file?

查看:68
本文介绍了如何将ItemAttachment的内容加载到文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时我的电子邮件格式是RTF,并且电子邮件正文中可能嵌入了图片。在EWS托管API中,资源将被视为ItemAttachment。如何使用ItemAttachment类将嵌入图像保存为本地文件? (类似fileAttachment.Load(路径))

感谢。

sometimes my email's format is RTF, and there may be images embedded in the email body. there resources will be treated as ItemAttachment in EWS managed API.
how can I use the ItemAttachment class to save the embedded image as a local file? (something like fileAttachment.Load(path))

thanks.

推荐答案

嵌入式图像应作为文件附件公开,而不是项目附件。

没有直接的方法将项目(或项目附件)保存到文件。您可以检索项目的MIME内容并将其保存到文件中,但它看起来不像您想要做的那样。
Embedded images should be exposed as file attachments, not item attachments.

There is no direct way to save an item (or an item attachment) to a file. You can retrieve the MIME content of the item and save that to a file, but it doesn't look like that's what you want to do.


这篇关于如何将ItemAttachment的内容加载到文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆