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
files. Is there a specification somewhere that tells me the encoding of the files, or do I just have to guess/assume one?
What is the encoding of an .eml file from IIS's SMTP server?
6.1k Views Asked by Mike Comstock At
3
There are 3 best solutions below
2

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... "