Content and Message IDs

Message IDs (MIDs) and Content IDs (CIDs) are used to identify and refer to email messages and specific pieces of content within those messages. They are formally described in RFC 2392.

Message IDs

A Message ID (or MID) is used to refer to a specific message. MIDs are automatically assigned to messages and are required to be globally unique. In email headers an MID is provided as the Message-ID field and enclosed between angle brackets. For example, here’s a MID for a message sent from GMail:

Message-ID: <>

The domain from which the message is send is often seen at the end of the MID. Here’s an MID for another message sent from the same GMail account.

Message-ID: <>

What about other services? Here are a couple of MIDs from messages sent via Amazon SES.

Message-ID: <>
Message-ID: <>

An MID header can be translated into an MID URL by (1) adding a mid: prefix and (2) URL-encoding. For example, the first MID above would translate to An MID URL would be used to refer to another message. For example:

Please refer to the <a href="">other message</a>.

Content IDs

A Content ID (or CID) refers to a specific piece of content within a message. In email headers a CID is provided as the Content-ID field and enclosed between angle brackets.For example, the image in the MIME content below is assigned a CID of

Content-Type: image/gif; name="small-image.gif"
Content-Disposition: inline; filename="small-image.gif"
Content-Id: <>
Content-Transfer-Encoding: base64


A CID URL can be used to refer to the corresponding content from another part of the message. For example:

<img src="">

A CID is normally used to refer to other pieces of content within the same message. However, a CID can be combined with a MID to refer to content within another message. Note: When a MID and CID are combined, the result is still an MID. For example:

<img src="">