Chapter 3. Multipurpose Internet Mail Extensions

In this chapter:

  • Mail with Attitude

  • MIME Header Fields

  • MIME Encoding

  • MIME Boundaries

  • MIME Summary

The Multipurpose Internet Mail Extensions (MIME) extend the basic text-oriented Internet mail system described in Chapter 2, Simple Text Messages, so that messages can contain arbitrary binary files. This is useful when someone wishes to send a nontext document (such as a word processing file or a spreadsheet) to someone else.

MIME is not hard. Forget everything you have heard about it. It is really relatively simple, yet provides a powerful and subtle set of features that allows documents to be identified by type. This is the basis of nontext Internet email and the World Wide Web.

This chapter describes the technical details of MIME; headers, encoding types, and boundaries. It best serves as a deep introduction and reference for those wishing to create programs that encode or decode MIME body parts.

The next chapter, Chapter 4, Creating MIME-Compliant Messages, gives examples of how to construct complete messages using MIME. That chapter may be used by programmers who wish to create or receive email messages with attachments from within their programs. Those of you who are interested in how MIME messages are formatted may wish to look over that chapter.

Power users who wish to write scripts that send or receive email with attachments and have little interest in how it is actually done don’t have to waste their time with either this chapter or ...

Get Programming Internet Email now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.