本文介绍了MIME树转换为MailMessage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写AA C#程序处理和转发电子邮件。我有一个POP3图书馆和MIME解析器,我需要的MIME树复制到 System.Net.Mail.MailMessage

I'm writing a a C# program that processes and forwards email messages. I have a POP3 library and a MIME parser, and I need to copy the MIME tree into a System.Net.Mail.MailMessage.

什么是映射不同的MIME部分 AlternateView S, LinkedResource s和<$ C的最佳方式$ C>附件 S'

What is the best way to map different MIME parts to AlternateViews, LinkedResources, and Attachments?

修改:这将适用于所有的邮件客户端(发送和接收)

EDIT: That will work with all mail clients (both sending and receiving)

推荐答案

现在,我复制了内容处置这不是<$ C什么$ C>在线,或以外的任何文本或图像,一个附件之外的MIME类别,任何内联图片 LinkedResource 在HTML视图中的MIME类东西或最后一个观点,和其他任何为 AlternateView 。 (我没有测试过)

Right now, I'm copying anything with a Content-Disposition which isn't inline, or with a MIME category of anything other than Text or Image, to an Attachment, anything inline, or anything with a MIME category of Image to a LinkedResource on the HTML view or the last view, and anything else as an AlternateView. (I haven't tested this yet)

这篇关于MIME树转换为MailMessage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 14:40