开发者

What is the encoding of an .eml file from IIS's SMTP server?

I need to write a program that read the .eml files from IIS's mail drop box, but I can't find a definitive source that tells me the encoding of the .eml f开发者_运维知识库iles. Is there a specification somewhere that tells me the encoding of the files, or do I just have to guess/assume one?


You need to read the Content-Transfer-Encoding header. This value will tell you how the email is encoded. The most common are 7-Bit (no encoding), Quoted-Printable (where you see a lot of =HEX pairs), and base64 (which is base 64 encoding).

Based upon that header value, you decode the following body part using the specified routine.


I found my answer at en.wikipedia.org/wiki/MIME: "The basic Internet e-mail transmission protocol, SMTP, supports only 7-bit ASCII characters... "


Though it's too late to answer but eml file format nothing but a plaintext MIME (rfc822) file format for storing emails.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜