Skip to main content

What are common formatting pitfalls in email headers?

Common pitfalls include missing colons, incorrect line breaks, misquoted values, and duplicated fields. Even extra spaces can cause parsing errors. Using bare line feeds (`

`) instead of proper carriage return and line feed pairs (`\r

`) is another frequent issue that can cause messages to be rejected by strict gateways enforcing line ending rules.

To stay seaworthy, validate headers against RFC 5322 and avoid manual editing whenever possible. Treat headers like rigging—tight, clean, and always secure.