View Full Version : MIME_HTML_ONLY and HTML_MIME_NO_HTML_TAG spamassassin rules being triggered

September 15th, 2010, 11:30 AM
If your contact forms seem to have the email not being sent, make sure you are setting the following properly, as this can cause a high score on the outbound mail servers when the message is scored via SpamAssassin.

The fix for MIME_HTML_ONLY is to set Content-Type: multipart/alternative in the headers message and include both text/plain and text/html parts.

The fix for HTML_MIME_NO_HTML_TAG is to make sure the email is properly formatted for HTML. When you use HTML in the email, it must be fully formatted for HTML.

Here is an example to use text and html:

<cfmail to="#toemail#" from="#fromemail#"
subject="Sample CF email with text and HTML formats"

<cfmailpart type="text" wraptext="60">
Congratulations! You have received a sample CF email as text!

<cfmailpart type="html">
<b>Congratulations!</b> You have received a sample CF email as HTML! <br /> <img src="http://hostek.com/images/hosteklogo.png">

September 15th, 2010, 02:36 PM
Here is an example of setting the Content-Type with CFMAIL using the CFMail Tag with cfmailparam.

from="Your_Name <[email protected]_name.com>"
to="Me <[email protected]_name.com>"
subject="Sample CF e-mail"
<cfmailparam name="Content-Type" value="text/html" />
<strong>This is the HTML part of the test email.</strong><br />
This is plain text.

The email uses the cfmailparam within the cfmail tag.