Answers.Body: <p>Wordfence is blocking you from sending mails with JS and CSS.</p>
  <p>Some requests contain data that may match patterns the firewall Wordfence uses to detect attacks.</p>
  <p>Go to your Wordfence extension menu in &quot;All Options&quot;.</p>
  <p>In this page go to the Basic FireWall Options part and activate the &quot;Learning Mode&quot;.</p>
  <p>Verify in the Advanced FireWall Options that all the rules are activated.
  Add your request in Allowlisted Urls.</p>
  <p>Don't forget to Save changes when you are done.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-19T11:29:39.177Z
Answers.Text: thanks Anatole. And welcome on Stackexchange ;-)
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-19T10:13:37.920Z
Answers.LastActivityDate: 2021-01-19T10:13:37.920Z
Answers.UserDisplayName: Anatole Allain
Answers.Body: <p>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.</p>
  <p>Is there anything else to set or a clever way to test because disabling was also unsuccessful?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-24T15:42:59.583Z
Answers.LastActivityDate: 2020-12-03T12:28:36.900Z
Answers.LastEditDate: 2020-12-03T12:28:36.900Z
Answers.UserDisplayName: Guillaume Sorel
Body: <p>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.</p>
  <p>Is this related to css (even if I use literal around code)?</p>
  <p>Any advice?</p>
  <p>EDIT 1: I was able to send very simple HTML but some more complex (but not so complex) code blocks CiviMail</p>
  <p>EDIT 2: I've tried with CiviCRM default templates 'Sample CiviCRM Newsletter' and nothing gets sent :-(</p>
  <p>EDIT 3: If I create a simple HTML message with the CKEditor, then it gets send.</p>
  <p>EDIT 4: I've tried enabling/disabling WordPress' PostSMTP extension and CiviCRM'S Flexmailer, Mosaico and CiviMAIL extensions and component without success.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-12T20:46:29.017Z
Comments.Text: On a contact record there is a communcation preference for email format. Maybe the recipient contact has it set to text?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-16T17:13:55.543Z
Comments.Text: uhm, I haven't seen such a preference. Is there a general parameter for HTML format type like in Drupal
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-16T18:13:44.277Z
Comments.Text: I'll post an answer so that I can include a screenshot.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-16T18:15:14.120Z
Comments.Text: I mean, I know where to find this preference but it's not the solution
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-16T18:15:31.047Z
Comments.Text: Oh ok..........
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-16T19:30:22.040Z
Comments.Text: Have you tried mosaico?
Comments.UserDisplayName: themak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-17T10:34:26.940Z
Comments.Text: good advice, I can't send test and campaigns with Mosaico even though the SMTP parameter is properly set. I will set this again.
Comments.UserDisplayName: Guillaume Sorel
Tags: <wordpress><email>
Title: Send email in HTML on WordPress
ThreadText: # Send email in HTML on WordPress
  
  (Asked by: username_0 on 2020-11-12)
  
  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.
  
  **Tags:** wordpress, email
  
  > **Comments:**
  > **username_1**: On a contact record there is a communcation preference for email format. Maybe the recipient contact has it set to text?  
  > **username_0**: uhm, I haven't seen such a preference. Is there a general parameter for HTML format type like in Drupal  
  > **username_1**: I'll post an answer so that I can include a screenshot.  
  > **username_0**: I mean, I know where to find this preference but it's not the solution  
  > **username_1**: Oh ok..........  
  > **username_2**: Have you tried mosaico?  
  > **username_0**: good advice, I can't send test and campaigns with Mosaico even though the SMTP parameter is properly set. I will set this again.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2021-01-19. Score: 3 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: thanks username_3. And welcome on Stackexchange ;-)  
  
  ---
  
  ### Answer by username_0 on 2020-11-24. Score: 0
  
  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?
  
  
  ---
  
  