Many HTML emails include logos, GIFs, and other types of images. While it is possible to host those assets publicly and reference them by their URLs in the source of HTML emails, this is not how it is commonly done. Instead, the image file content is wholly embedded into the email, separately from the HTML content, which is achieved by marking the email as multipart/related
.
The body of a multipart/related
email is split into multiple parts, one of which is the HTML source while the rest are the stretches of binary file content (one part for each binary file). Each part carrying a binary file can then be marked by a content-id which in turn can be used as a reference to this file in the HTML part of the email.
For example, if an email includes an image contained in a body part marked with Content-ID: <myimage>
, the HTML body part can include the <img src="cid:myimage">
tag that displays the embedded image.
The difference between the email envelope and message headers when it comes to senders and recipients.
A simple online editor for MJML (Mailjet Markup Language).
How to receive email in Node.js?
How do multipart emails work?
Parse, inspect, and debug emails online.
All prices listed are in United States Dollars (USD). Visual representations of products are intended for illustrative purposes. Actual products may exhibit variations in color, texture, or other characteristics inherent to the manufacturing process.