How do you know it is a valid e-mail?
What happens if you save
whole e-mail in a file, name is as *.eml and open in Outlook Express (bundled with all Windows versions)? Can you save and open binary files from e-mail sections.
Open the file with text editor. Even if the e-mail contains binary files, it's always a plain text file. You should see it content type "
Content-Type: multipart/alternative
", in case of zip your binary section should be a part with
Content-Type: application/octet-stream; name="yourfilename.zip"
Content-Disposition: attachment; filename="yourfilename.zip"
Content-Transfer-Encoding: base64
These line must be followed by an empty line followed by base64-encoded string. You should be able extract it manually and decode using
System.Convert.FromBase64String
.
Do you see something like that?
Look how processing of attachment is implemented here:
A POP3 Client in C# .NET[
^] (it's about POP3, but you're interested only in the the structure of e-mail).
—SA