Multipart MIME Emails

For anything beyond a plain text email, the email needs to be MIME encoded and will probably have several sections defined in it. Here is a list of the most commonly used options and what they are used for.


This allows you to have multiple parts in the email all of which are available at the same time. It is most commonly used to handle attachments to the email.


This allows you to define alternative sections in your email, only one of which will actually be displayed depending on the email program and settings used to read the email. It is most commonly used with newsletter type emails to provide both a plain text and HTML version of the same email allowing people to read their preferred format without your having to provide two separate emails and have them choose in advance. The disadvantage is that it makes the email bigger.


This allows you to define parts for an email that are related specifically to another part. If you have alternative plain text and html parts in your email and you wish to embed images in the html version and not have them show as attachments to the text version then you would use this option.


If this option were more commonly used in emails then there would be a lot less spam. This option uses a digital certificate to identify the sender of the email providing a confirmation for the recipient of who it was that sent the email. It also allows the recipient to confirm that the email has not been tampered with since it was sent.


Most emails are just like sending postcards by snailmail, anyone who has access to it during its journey from the sender to the recipient can read it. Once the sender and recipient have exchanged signed emails it becomes possible to use those two signatures in combination to encrypt the content of the email such that only the intended recipient can read it.

Less Common

There are additional multipart options beyond the ones mentioned above but they have more specialised uses. Examples of these include multipart/digest, multipart/report, and multipart/form-data.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow