发送内联MHTML [英] sending inline MHTML

查看:137
本文介绍了发送内联MHTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以通过.NET 2.0 MailMessage对象发送一个在线创建的内联MHTML文件。

I was wondering if it is possible through the .NET 2.0 MailMessage object to send an inline MHTML file that is created on the fly.

通过inline我的意思是:它应该以一种方式发送

By inline I mean: It should be sent in a way that the user can see it, once he opens the email, without having to open/download the attachment.

推荐答案

(jdecuyper - 感谢您的插件,正如我写的aspNetEmail)。

(jdecuyper -- thanks for the plug, as I wrote aspNetEmail).

您可以使用aspNetEmail执行此操作。您可以用MHT替换电子邮件的全部内容。

You can do this with aspNetEmail. You can replace the entire contents of the email message with your MHT.

您不能使用System.Net.Mail进行此操作,但如果您想要进行商业化路线,给我发电子邮件dave@advancedintellect.com,我会告诉你如何做到这一点。

You can't do this with System.Net.Mail, but if you want to go the commerical route, pop me an email at dave@advancedintellect.com and I'll show you how this can be done.

如果你想去一个开源路由,那里可能是codeproject上的一些SMTP代码,您可以修改此代码。基本上,您将内容注入到SMTP进程的DATA命令中。

If you want to go an open source route, there is probably some SMTP code on codeproject that you could modify to do this. Basically, you would inject your contents into the DATA command of the SMTP process.

有一件事要注意:如果您的MHT文档具有嵌入脚本,Flash,activeX对象或任何内容这可能被邮件客户端阻止,它可能不会像您在浏览器中看到的一样。

One thing to note: If your MHT document has embedded scripts, flash, activeX objects or anything that may be blocked by the mail client, it probably won't render the same as what you are seeing in the browser.

这篇关于发送内联MHTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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