previous | start | next

Email Attachments

The Multipart Internet Mail Extensions (MIME -- originally RFC1521 and RFC1522, now updated in RFC2045-9) 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, whilst retaining compatability with RFC822.
 
The MIME specification adds several new header types. 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
Lecture 4: Applications #2: Email Copyright © 2005 P.Scott, La Trobe University Bendigo.


previous | start | next