previous | start | next

Email Attachments

The Multipart Internet Mail Extensions (MIME -- RFC1521 and RFC1522) specification extends the SMTP protocol to allow the mail message body to contain attachments or enclosures. This allows SMTP to be used to send files of arbitrary type.
 
The MIME specification adds several new header types to RFC822. In the most common usage, the following are added to the basic message header:
MIME-Version: 1.0
Content-Type: Multipart/Mixed; Boundary=NextBitString_8765r443
The message is then structured into one or more "message parts", using the "Boundary" string as a separator.The following shows an audio attachment to an ordinary text message. Note that non-ASCII data is usually encoded into an ASCII representation.
--NextBitString_8765r443
Content-Type: text/plain

Ordinary email mesage in plain ASCII text

--NextBitString_8765r443
Content-Type: audio/basic; name="message.au"
Content-Transfer-Encoding: base64
    
...ASCII encoded data for the audio message


previous | start | next