When an e-mail message is sent from one person to another, a header containing peripheral information precedes the body
of the message itself. THis peripheral informaiton is contained in a series of header lines. The header lines
and the body of the message are seperated by a blank line. As with HTTP, each head line conatins readable text, consisting
of a keyword followed by a colon followed by a value. Some of the keywords are required and others are optional.
Every header must have a From: header liner and a To: header line; a header may include a Subject:
header line as well as other optional header lines. It is important to note that these header lines are different
from the SMTP commands.
The MIME Extension for Non-ASCII Data
While the message headers are satisfactory for sending ordinary ASCII text, they are not sufficiently rich for multimedia
messagese or for carrying non-ASCII text formats. To send content other than ASCII text, the sending user agent must
include addtional header in the message.
The two key MIME headers for supporting multimedia are the Content-Type
: header and the Content-Transfer-Encoding: hearer. The Content-Type: header allows the receiving user agent to take an appropriate
action on the message.
By indicating that the message body contains a JPEG image, teh receiving user agent can direct the message body to a
JPEG decompression routine. To understand the need for the Content-Transfer-Encoding:
header, recall that non-ASCII text messages must be encoded to an ASCII format that isn't going to confuse SMTP. The
Content-Transfer-Encoding: header alerts the receiving user agent
that the message body has been ASCII-encoded and indicates the type of encoding used. When a user agent receives a messsage
withthese two headers, it first uses the value of the Content-Transfer-Encoding:
header to convert the message body to its original non-ASCII form, and then uses the Content-Type:
header to determine what actions it should take on the message body.
The Received Message
The receiving server appends a Received: header line to the top of the message; this header line specifies the name of
the STMP server that sent the message, the name of the SMTP server that received the message, and the time at which the receiving
server received the message.