What is a malformed message?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
A malformed message is an email that breaks the structural rules laid out in RFC 5322 and MIME standards. Think missing colons in headers, illegal characters, duplicate headers that shouldn't exist, broken MIME boundaries, or contradictory encoding declarations.
Why does this matter? Mailbox providers like Gmail and Outlook will often reject or quarantine malformed messages outright. They look like spam or malware because that's usually what they are. Spammers cut corners, legitimate senders follow the rules.
How does a message become malformed in the first place? Most commonly: ESP bugs (rare but it happens), header injection attempts (security issue), encoding problems when handling international characters, or custom SMTP implementations that didn't read the RFC closely enough. If you're using a mainstream ESP like Mailchimp or Postmark, you're probably fine. They handle the header construction for you.
But if you're building custom SMTP, using an API to construct messages, or letting user input touch email headers, you can absolutely create malformed messages by accident. Common mistakes: forgetting to encode international characters in subject lines (RFC 2047 requires it), inserting newlines into header values without proper folding, duplicating headers like Message-ID or Date, and using non-ASCII characters in header names.
If you suspect you're sending malformed messages, check your email source (View > Show Original in Gmail, or use our Source Analyzer). Look for obvious header breaks, missing colons after header names, or encoding that looks garbled. If you're stuck diagnosing it, ask us. Malformed message errors can be cryptic.
Related: if you're seeing duplicate headers, that's technically a malformed message too. And if you're confused about HTML vs text body structure, that's MIME territory.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.