EWS托管API:重新汇总消息 [英] EWS Managed API: re-sumbit Message

查看:84
本文介绍了EWS托管API:重新汇总消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,是什么是重新提交作为附件到达的邮件的正确/推荐方法?

在我的代码中,我将附件作为ItemAttachement抓取并将其转换为EmailMessage宾语。但是,当我尝试使用EmailMessage.Send()时,它会返回InvalidOperationException("附件不支持此操作。")。
我知道我可以创建一条新消息,但后来我'必须复制一切 - 似乎有点多余(??)

提前获得帮助和/或指针!
Rgds - Marcus。

Hi All,
what is the correct/recommended way to resubmit a message that arrives as an attachement?

In my code I grab the attachment as ItemAttachement and cast it into an EmailMessage object. But when I try a EmailMessage.Send() it returns an InvalidOperationException ("This operation is not supported on attachments.").

I know I could just create a new message, but then I'd have to copy everything over - seems a little redundant (??)

Thx in advance for help and/or pointers !
Rgds - Marcus.

推荐答案

Marcus,很遗憾,您必须创建附加邮件的副本。您可以使用MIME来简化这一过程;请求附加消息的MimeContent属性,并通过仅指定其MimeContent属性来创建新消息。
Marcus, unfortunately you'll have to create a copy of the attached message. You can use MIME to make that easier; request the MimeContent property of the attached message and create the new one by only specifying its MimeContent property.


这篇关于EWS托管API:重新汇总消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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