Suped

Summary

The question of whether commented code in emails affects spam filters and deliverability is a nuanced one. While some believe that any unnecessary code, including comments, can lead to increased email size and potential flagging by spam filters, others argue that modern spam filters are sophisticated enough to disregard benign comments. The impact often depends on the type and quantity of comments, as well as the overall sender reputation and content quality of the email.

What email marketers say

Email marketers often balance the need for clear, maintainable code with deliverability concerns. Many advocate for stripping comments from production emails to reduce bloat and eliminate any potential (even if minor) risk of triggering spam filters. However, some acknowledge that for most filters, the presence of simple comments is unlikely to be the primary cause of an email being marked as spam, as sender reputation and content relevance hold more weight.

Marketer view

Marketer from Email Geeks notes that using gibberish in comments is a technique some spammers employ to circumvent content filters that scan for specific patterns or signatures.

14 Aug 2018 - Email Geeks

Marketer view

Marketer from Email Geeks suggests that marketers should always remove commented code, emphasizing that emails are not webpages. This extra bloat is unnecessary and can potentially confuse spam filters.

14 Aug 2018 - Email Geeks

What the experts say

Email deliverability experts generally agree that while overly large or malicious comments can be problematic, simple, short comments are unlikely to be a primary spam trigger. They emphasize that robust spam filters analyze content differently than browsers, often stripping out comments or evaluating them based on broader patterns of malicious behavior rather than their mere presence. The focus for deliverability remains on sender reputation, authentication, and user engagement over minor code elements.

Expert view

Expert from Email Geeks notes that good Bayesian spam filters are designed to extract HTML from value tags, meaning that content placed within comments should ideally not negatively impact or positively influence spam scoring. Anything within the body of three characters or less also typically does not count.

14 Aug 2018 - Email Geeks

Expert view

Expert from Email Geeks agrees that commented code simply adds bloat to the production message. If omitting comments isn't feasible, they advise keeping their quantity and size to a minimum, suggesting short comments like <!-- top --> instead of lengthy instructional ones.

14 Aug 2018 - Email Geeks

What the documentation says

Official documentation and research often focus on specific technical standards and common spamming techniques. While explicit warnings about HTML comments are rare, general guidelines for email design emphasize lean code and avoiding elements that could be exploited for malicious purposes. The underlying principle is that email content should be straightforward and avoid characteristics commonly associated with spam, regardless of whether they are visible to the recipient.

Technical article

Documentation from Dyspatch highlights that no email filter will flag an email as spam simply because of a small amount of code. This suggests that the presence of benign comments is unlikely to be a direct spam trigger.

15 Sep 2014 - Dyspatch

Technical article

Documentation from Email on Acid emphasizes that using overly large emails without supporting text can raise a red flag for spam filters. This implies that code bloat, potentially including excessive comments, could contribute to deliverability issues.

01 Jan 2014 - Email on Acid

15 resources

Start improving your email deliverability today

Get started