Is there a parameter to set to send HTML e-mails from WordPress 5.5.1 / CiviCRM 5.29? Plain-text e-mails are send and tokens merged but HTML doesn't get sent.

Is this related to css (even if I use literal around code)?

Any advice?

EDIT 1: I was able to send very simple HTML but some more complex (but not so complex) code blocks CiviMail

EDIT 2: I've tried with CiviCRM default templates 'Sample CiviCRM Newsletter' and nothing gets sent :-(

EDIT 3: If I create a simple HTML message with the CKEditor, then it gets send.

EDIT 4: I've tried enabling/disabling WordPress' PostSMTP extension and CiviCRM'S Flexmailer, Mosaico and CiviMAIL extensions and component without success.

  • On a contact record there is a communcation preference for email format. Maybe the recipient contact has it set to text?
    – Demerit
    Commented Nov 12, 2020 at 20:46
  • uhm, I haven't seen such a preference. Is there a general parameter for HTML format type like in Drupal Commented Nov 16, 2020 at 17:13
  • I'll post an answer so that I can include a screenshot.
    – Demerit
    Commented Nov 16, 2020 at 18:13
  • I mean, I know where to find this preference but it's not the solution Commented Nov 16, 2020 at 18:15
  • Oh ok..........
    – Demerit
    Commented Nov 16, 2020 at 18:15

2 Answers 2


Wordfence is blocking you from sending mails with JS and CSS.

Some requests contain data that may match patterns the firewall Wordfence uses to detect attacks.

Go to your Wordfence extension menu in "All Options".

In this page go to the Basic FireWall Options part and activate the "Learning Mode".

Verify in the Advanced FireWall Options that all the rules are activated. Add your request in Allowlisted Urls.

Don't forget to Save changes when you are done.

  • thanks Anatole. And welcome on Stackexchange ;-) Commented Jan 19, 2021 at 11:29

Half solved: I can actually send HMTL but I've having troubles with templates using css. Probably related to smarty but I don't know how to solve as define smarty is on 1 in settings.php and entities boolean is set to false in CKEditor settings.

Is there anything else to set or a clever way to test because disabling was also unsuccessful?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.