如何为通过 Exchange Server 发送邮件设置 MHT-body?
我有一条消息作为 MHT 文件。现在我正在寻找一种方法来设置通过 Exchange Server(使用 Exchange Web 服务)发送的邮件。当我将其设置为 MIME-Content 时,各个部分(图片和文本)将作为附件(JPEG 文件和 HTML 文件)附加。但我需要一种方法将整个 MHT 设置为包含所有包含对象的主体。
以下是将MHT作为附件附上。怎么了?
EmailMessage message = new EmailMessage(service);
message.MimeContent = new MimeContent { Content = File.ReadAllBytes(bodyPath) };
I have a message as an MHT-File. Now I am searching for a way to set this for a mail to send through Exchange Server (with Exchange Web Service). When I set it as a MIME-Content, the parts (picture and text) will be attached as attachments (JPEG file and HTML file). But I need a way to set the whole MHT as a body with all containing objects.
The following is attaching the MHT as attachments. What is wrong?
EmailMessage message = new EmailMessage(service);
message.MimeContent = new MimeContent { Content = File.ReadAllBytes(bodyPath) };
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我现在使用 Indepenendent-Soft 的 Exchange WebService 编程组件解决了这个问题。
I have it solved now with the Component for Exchange WebService programming from Indepenendent-Soft.