基本的C#MIME解码基本、MIME

由网友(語過添情△)分享简介:有没有处理多部分MIME数据在C#中的清洁方式。Is there a clean way of handling multi-part MIME data in C#.调用一个封闭的应用程序后,(我没有获得改变它)我得到一个MIME效应初探类似下面。请问C#提供通过System.Net.Mime或System.Ne...

有没有处理多部分MIME数据在C#中的清洁方式。

Is there a clean way of handling multi-part MIME data in C#.

调用一个封闭的应用程序后,(我没有获得改变它)我得到一个MIME效应初探类似下面。请问C#提供通过System.Net.Mime或System.Net.Mail来解析这个能力?

After a call to a closed application (I have no access to change it) I get a MIME reponse like the one below. Does C# provide the ability to parse this via System.Net.Mime or System.Net.Mail?

MIME-Version: 1.0
Content-Type: multipart/mixed; 
    boundary="----=_Part_42_31322961.1286389502467"

------=_Part_42_31322961.1286389502467
Content-Type: text/xml
Content-Transfer-Encoding: 7bit
Content-ID: <xmlContextInfo>
<UnneededXML> <Stuff> </Stuff> </UnneededXML>


------=_Part_42_31322961.1286389502467
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-ID: <myImage>

/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a

我真正需要的反应是MYIMAGE部分(这是比上面所示更长的时间)

All I really need from the response is the "myImage" portion (which is much longer than what is shown above)

推荐答案

您可以使用 OpenPOP 库其中包括MIME解析器。

You can use OpenPOP library which includes mime parser.

阅读全文

相关推荐

最新文章