Mike Comstock
Mike Comstock

Reputation: 6720

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 files. Is there a specification somewhere that tells me the encoding of the files, or do I just have to guess/assume one?

Upvotes: 0

Views: 6731

Answers (3)

irsis
irsis

Reputation: 1054

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

Upvotes: 0

dave wanta
dave wanta

Reputation: 7214

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.

Upvotes: 2

Mike Comstock
Mike Comstock

Reputation: 6720

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

Upvotes: 1

Related Questions