5.7.512: Missing or invalid From: header
Microsoft 365 returns 5.7.512 when a message has no valid address in its From: header, as RFC 5322 section 3.6.2 requires. Gmail rejects the same problem under 550 5.7.1. It usually comes from a script or app that builds its own headers. Send a properly formatted From: with angle brackets.
The exact message
Microsoft 365 / Exchange Online
5.7.512 Access denied, message must be RFC 5322 section 3.6.2 compliant
Why it happens
- A script or app sets From: to a bare name with no address.
- The From: address is malformed, for example missing the domain part.
- The From: header is missing entirely because only the envelope sender was set.
How to fix it
- Set From: as "Display Name <user@yourdomain.com>".
- Check the raw message source to confirm exactly one From: header with one address.
If you send cold email
Custom sending scripts and mail-merge tools are the usual cause. Mailbox-connected tools that send through Gmail or Outlook set From: correctly.
How WarmHawk handles it
WarmHawk checks SPF, DKIM and DMARC for each sending domain against live DNS and keeps "could not check" separate from "failed", so a flaky resolver never looks like a broken record. New mailboxes warm up by sending to partner inboxes and recording where each email landed, so an authentication problem shows up in the warmup results before the mailbox graduates to campaigns. How WarmHawk works →
Check your domain now
These free checkers read your live DNS: no account, up to 15 domains at once.
Related bounce codes
Sources, checked 2026-09-29: Microsoft Learn: NDRs and SMTP errors in Exchange Online · Google Workspace: Gmail SMTP errors and codes. Have a different bounce? Paste it into the decoder →
Questions
5.7.512 questions
What does 5.7.512 mean?+
Microsoft 365 returns 5.7.512 when a message has no valid address in its From: header, as RFC 5322 section 3.6.2 requires. Gmail rejects the same problem under 550 5.7.1. It usually comes from a script or app that builds its own headers. Send a properly formatted From: with angle brackets.
Is 5.7.512 a temporary or permanent error?+
Permanent. The message will not be retried, and sending it again unchanged will fail the same way until the cause is fixed.
How do I fix 5.7.512?+
Set From: as "Display Name <user@yourdomain.com>". Check the raw message source to confirm exactly one From: header with one address.