views:

251

answers:

1

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?

A: 

Hi,

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.

Cheers!

Dave

dave wanta
Thanks Dave. The problem is reading the header itself. Can I assume that the headers are ACII characters?
Mike Comstock