How to format messages according to RFC 5322 for Gmail sender guidelines?
Summary
What email marketers say10Marketer opinions
Email marketer from Reddit shares to avoid common formatting errors such as missing or incorrect Content-Type headers, invalid character encodings, and improper use of MIME boundaries. These errors can lead to deliverability issues and non-compliance with RFC 5322.
Email marketer from Litmus explains that the MIME-Version header is crucial for indicating that the message conforms to MIME standards. The Content-Type header specifies the type of data in the message body (e.g., text/plain, text/html) and must be correctly set to ensure proper rendering.
Email marketer from Mailjet explains that essential email headers include From (sender's address), To (recipient's address), Subject, Date, and MIME-Version. Correctly formatting these headers is crucial for deliverability and compliance with RFC 5322.
Email marketer from SparkPost suggests to implement DKIM (DomainKeys Identified Mail) and SPF (Sender Policy Framework) for email authentication. These mechanisms help verify the sender's identity and improve deliverability by complying with sender guidelines.
Email marketer from GlockApps explains that you should regularly monitor your email deliverability using tools that provide insights into inbox placement rates, spam folder placement, and authentication status. This helps identify and address any formatting or compliance issues that may be affecting deliverability.
Email marketer from Stack Overflow explains that RFC 5322 specifies a maximum line length of 998 characters, excluding the trailing CRLF. Lines exceeding this limit must be folded (split) to adhere to the standard.
Email marketer from Campaign Monitor explains that using valid character encoding (e.g., UTF-8) is essential for ensuring that all characters in your email are displayed correctly across different email clients and platforms. Incorrect encoding can lead to garbled text and formatting issues.
Email marketer from Email Geeks shares to pay attention to line size limits, especially the one that says 998 characters max plus CR/LF. HTML tags that insert line breaks into content don't count as CR/LF; you have to actually physically press the return key every now and then
Email marketer from Email on Acid shares that you need to use tools to test email formatting and rendering across different email clients. This helps ensure that your emails are displayed correctly and comply with RFC 5322 standards.
Email marketer from SendGrid shares to avoid excessive HTML code and overly complex layouts in your email designs. Simplified, well-structured HTML improves rendering and reduces the likelihood of formatting issues that may violate RFC 5322.
What the experts say8Expert opinions
Expert from Email Geeks explains that generally, unless you're a MTA developer, you don't need to care about RFC 5322. But the tl;dr is: don't duplicate headers that shouldn't be duplicated (ie, no double to: from: or subject lines). Also: pay attention to your line endings and don't encode things that shouldn't be encoded.
Expert from Spam Resource explains that proper email authentication (SPF, DKIM, DMARC) is vital for compliance. It ensures that your emails are correctly identified and trusted by receiving mail servers, improving deliverability.
Expert from Email Geeks answers that unless you’re a software developer, just pour your content into your ESPs message composition window and it’s their problem. Like, you cannot as a user make email that violates the various RFCs via your ESP. If you manage to, it’s a bug the ESP needs to fix.
Expert from Email Geeks shares the MTA won’t typically fix up badly formatted mail. It breaks all the things if it tries. The buck stops with the MUA (which at the ESP is the message composition tool). Laura Atkins agrees.
Expert from Word to the Wise explains that handling bounces and feedback loops correctly is crucial. Properly processing bounce messages helps you maintain a clean sending reputation and ensures that you comply with sender guidelines by removing invalid addresses.
Expert from Spam Resource explains that proper MIME encoding for email content is necessary for compliance. Make sure the character encoding used is declared correctly, using UTF-8 to support a wide range of characters without issue.
Expert from Email Geeks answers that poor delivery will typically be caused by your address acquisition practices or your content. Steve thinks SFMC is a terrible ESP, but even they will be able to format email technically correctly most of the time. Laura Atkins agrees that RFC compliance will not cause poor delivery. Al Iverson states that RFC header compliance is not an issue for SFMC.
Expert from Word to the Wise explains that you should ensure the ‘From’ header accurately reflects the sender and is consistent with the domain’s reputation. A misleading 'From' address can result in filtering and non-compliance.
What the documentation says5Technical articles
Documentation from DKIM explains that a DKIM signature is a digital signature added to the header of an email message. The signature is used to verify that the message was sent by an authorized sender and has not been altered in transit. The DKIM signature consists of a hash of the message body and a hash of the message headers. The DKIM signature also includes the sender's domain name and the date and time the message was sent.
Documentation from Microsoft details that messages sent over the internet must be in the Transport Neutral Encapsulation Format (TNEF). TNEF is a Microsoft-specific email format for encapsulating MIME messages. Email clients that do not support TNEF may not be able to properly interpret the contents of the email.
Documentation from Google Support details that messages must be formatted using the Internet Message Format standard (RFC 5322). This includes proper header formatting, such as To, From, and Subject, and correct MIME type declarations for email content.
Documentation from Auth0 details that Json Web Tokens (JWT) are an open, industry standard RFC 7519 method for representing claims securely between two parties. JWT's can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.
Documentation from ietf.org details that RFC 5322 specifies the Internet message format. Messages consist of header fields and, optionally, a message body. The header fields contain information such as sender, recipient, subject, and date.