0

Trying to use my own custom html e-mail in CiviMail with custom CSS in it (specifically to optimize on mobile). When I have the CSS stylesheet info on top I cannot send a test email or preview in HTML. when I click either of them I get Error "Sorry an error occurred and your information was not saved" How can I get around this?

2

You will need to add your style sheet inside {literal} when adding stylesheet in Message template. For example

{literal}
<style>
 your code
</style>
{/literal}
  • Maybe I'm doing something wrong but I'm just getting {literal}{/literal} in my email message now. – netzih Jun 29 at 1:15
  • I was wondering if civimail only works with CSS inline? – netzih Jun 29 at 1:23
  • Try adding the setting in civicrm.setting.php described here docs.civicrm.org/user/en/latest/common-workflows/… – Demerit Jun 29 at 3:13
  • @Demerit I think that's something totally different. Smarty is enavled and used but that does not have to do with this AFAIK. – netzih Jun 30 at 17:01
0

What fixed or for me was creating a css file and copying the style sheet into that file and referencing it as a external style sheet in the html (instead of having it in the actual email)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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