
The Anatomy of an E-Mail Message File
A standard SMTP e-mail message consists of a message envelope and message content. The message envelope contains information that is required for transmitting and delivering the message. The message content contains message header fields that are collectively called the message header, and the message body. The message envelope is described in RFC 2821, and the message header is described in RFC 2822.
When a sender composes an e-mail message and submits it for delivery, the message contains the basic information that is required to comply with SMTP standards, such as a sender, a recipient, the date and time that the message was composed, an optional subject line, and an optional message body. This information is contained in the message itself and, by definition, is contained in the message header. The sender's messaging server generates a message envelope for the message by using the sender and recipient information found in the message header and transmits the message to the Internet for delivery to the recipient's messaging server. Recipients never see the message envelope, because it is generated by the message transmission process and is not actually part of the message. Each server that is involved in the transmission of the message may insert message header fields related to the server's role in delivering the message or other application-specific message header fields into the message header. When the recipient opens the message by using an e-mail client, the e-mail client displays some of the more relevant information from the message header, such as the sender, the recipients, and the subject together with the message body.
The best analogy for explaining the relationship between the message envelope and the message header is sending conventional mail in a large company. You write a formal business letter with your company's address and the recipient's address in the salutation at the top of the letter. You give the letter to your company's mail room personnel for processing. The mail room personnel create an envelope by using the recipient information in your letter, seal your letter in an envelope, and drop the envelope in the mailbox for delivery. The postal service delivers the envelope to the recipient's company based on the address on the envelope. The mail room personnel at the recipient's company receive the envelope, determine the recipient based on the envelope, open the envelope, and put the letter in the recipient's personal mail box. When the recipient retrieves your letter from their personal mail box, he or she knows, from the information in the salutation, that you wrote the letter and that the letter is for him or her.