Gmail message-format rejection
Fix Gmail 554 5.6.0: email message is malformed
Gmail returns 554 5.6.0 when the message is malformed. Inspect the raw output of the application or mail library for invalid headers, line endings, MIME boundaries, encodings, or structure.
Gmail reports:
554 5.6.0 Email message is malformed. Not accepted.
The 554 result is permanent for this message. Generate a corrected message and submit it as a new delivery.
Common causes
- Missing or malformed required headers.
- Invalid header folding, line endings, or duplicate singleton fields.
- Broken multipart boundaries or transfer encoding.
- An application concatenates raw fields without a standards-aware mail library.
- A gateway corrupts or truncates the message.
How to resolve it
- Capture the raw message before it leaves the generating application.
- Validate it against current Internet Message Format and MIME rules.
- Upgrade or correctly configure the mail library.
- Compare the message before and after each gateway.
- Generate a minimal new test, then restore content incrementally.
Frequently asked questions
What does Gmail 554 5.6.0 mean?
Gmail rejected the email because the message structure was malformed.
Is this fixed by changing DMARC?
No. Validate the message generator, RFC headers, and MIME structure.
What evidence should I keep?
Keep the raw generated message before submission and the complete Gmail response, with personal content redacted before sharing.
Related email diagnostics
Primary sources: Gmail SMTP errors and codes and RFC 5322 Internet Message Format.