views:

332

answers:

1

I'm trying to wrap my head around the EML files I see generated by System.Net.Mail.MailMessage and generated or consumed by Microsoft's SMTP Server. I've been reading RFCs 5322 and 5321 and I'm trying to make sense of the format.

Granted, the majority of the EML files I see are adherent to the message format described in 5322 (or 2322 or 822, however good MS stuck to the standards, I don't know). However, I can't quite decide if the top portion of the file (the X-Sender and X-Receiver lines) constitute the "envelope" as described by 5321.

I guess my questions are: 1. Is there documentation for the portion of this file with X-Sender/X-Receiver lines (above the message contents)? 2. Are there other "commands" that can be expected in this section? 3. Is this a "standard" across the board? i.e. can I expect an EML file that is generated by System.Net.Mail.MailMessage to be parsed correctly in any standard SMTP server?

+1  A: 

Hi,

No, there isn't any documentation. This is something only done by the IIS SMTP service, and there aren't any other commands that I'm aware of.

However, the email is still RFC2822 compliant. It just prepends the message with some X-Headers that are still RFC compliant, but are recognized the IIS SMTP service.

The IIS SMTP service will use the X-Sender value as the SMTP MAIL FROM value, and the X-Receiver as the RCPT TO value.

Cheers!

Dave

dave wanta