Plain-text alternative generated for all HTML emails
Why it matters
An HTML-only email displays raw markup in Gmail's push notification preview, in plain-text email clients used in corporate environments, and in assistive technologies that cannot parse HTML. Spam filters from Barracuda, SpamAssassin, and Proofpoint penalize the absence of a multipart/alternative structure because it is a known characteristic of automated spam. RFC-2046 defines the multipart/alternative MIME structure specifically to ensure that all receivers can display a meaningful representation of the message.
Severity rationale
Info because the consequence is display degradation and minor spam score penalties rather than security exposure or data loss.
Remediation
Auto-generate the plain-text part from the rendered HTML using html-to-text in the send path:
import { convert } from 'html-to-text'
export function prepareEmailParts(html: string, explicitText?: string) {
const text = explicitText ?? convert(html, {
wordwrap: 80,
selectors: [
{ selector: 'a', format: 'inline', options: { hideLinkHrefIfSameAsText: true } },
{ selector: 'img', format: 'skip' }
]
})
return { html, text }
}
Pass both html and text to every ESP send call. The text field must not be an empty string — that is treated identically to an omitted field by spam filters.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Sending Pipeline & Infrastructure Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- external · RFC-2046-multipart-alternative — RFC 2046 §5.1.4 — multipart/alternative MIME subtype
Taxons
History
- 2026-04-18·v1.0.0·Initial import from sending-pipeline-infrastructure·automated