Multipart/alternative email

One email carrying both plain-text and HTML versions of the same content, so each mail client can choose the format it can display.

send both plain text and HTML emailplain text fallback for an HTML emailtwo versions inside one emailmultipart alternitive emailtext part and html partemail looks plain when HTML is blockeddo i still need a text only version of my emailwhy does my email need a text version

See it

Live demo coming soon

What it is

A multipart/alternative message bundles the same email in different representations, normally 'text/plain' followed by 'text/html', under one MIME boundary. The receiving client chooses the richest format it supports or the one the user prefers. It is not two sends, and the plain part is not an attachment.

Use it for almost every HTML email. The text version gives plain-text clients, accessibility workflows, previews, and security-conscious readers usable content when HTML is unavailable. RFC 2046 orders alternatives from least to most faithful, which is why HTML normally comes after plain text inside the alternative part.

The text part is not a box-checking dump. Raw HTML stripped of tags leaves smashed paragraphs, repeated tracking URLs, and missing calls to action. Write equivalent content with readable links and no HTML syntax. Attachments belong in an outer multipart/mixed container, and having both alternatives does not guarantee inbox placement or repair bad authentication.

Ask AI for it

Build this message with Nodemailer using both the 'text' and 'html' fields so it produces a MIME multipart/alternative body. Keep the same meaning, links, unsubscribe instructions, and call to action in both versions, but format the text version for an 80-column plain-text reader instead of stripping tags mechanically. Follow RFC 2046 by placing text/plain before text/html inside the alternative boundary. If attachments are present, verify Nodemailer wraps the alternative part inside multipart/mixed rather than treating attachments as alternatives. Add a test that parses the raw message, asserts both content types and their order, checks that every destination URL is represented in both parts, and renders the result with HTML disabled.

You might have meant

transactional emailbulk email and marketing emailemail service provider and smtp relayone click unsubscribespam complaint rate

Go deeper