HTML tags stripped out in email template

I’ve spent quite a bit of time setting up SuiteCRM for my business. Today I tried sending a test email campaign. After sending a few tests, I realized that the responsive email template I was pasting into the HTML editor was having most of the CSS stripped away so the email was no longer responsive. This pretty much brings my use of SuiteCRM for email campaigns to a complete halt. Upon doing some research, I found this is what TinyMCE does with some kind of safety stripping configuration? Is there any way to prevent this behavior so what you see really is what you get? I cannot use SuiteCRM for email campaigns otherwise. This is quite unbelievable. Thanks.

I just saw this same issue reported over a year and a half ago. I cannot understand how you are moving forward with versions XYZ when basic, required and fundamental functionality such as sending out responsive HTML emails isn’t there! I just find it hard to believe in a CRM such as this in this day and age. Almost makes me feel like throwing away months of effort learning and using SuiteCRM to find this issue. Sorry I’m venting but it’s really frustrating!

Either you configure tinyMCE telling it not to strip the tags or you paste the gtml directly into the database (this isa possible solution only if you never edit the templates because if you save them with tinyMCE the tags get stripped, and in any case it would require a technichal person to do it, but it works)

Thanks for the reply. I am technical but I don’t think inserting directly into the DB is a good solution. I can look into configuring TinyMCE but I’ve read there’s this thing called HTML purifier which is used by TinyMCE and that might be the culprit? I need to figure out how to deactivate it. I’m amazed more people have not complained about this on the forum.

I had a look at HTML purifier and I think that the fastest way to deactivate it is to modify the classes so that the output is the same as the input. in that way you only have to change a few things only inside that class.
Obviously yo will lose the purifier advantages and you have to remember that this method will not be upgrade safe.

Hmmm, where is HTML purifier being called from? Thanks.

Does anyone have a solution for this? Because TinyMCE is stripping out email tags, my template doesn’t show properly. I’m probably going to have to use my old mailer, PHPlist, to import contacts from SuiteCRM and send them email using my HTML email template. This is going to be such an inconvenience and a show stopper. Sending email campaigns to my leads and contacts is one of the most important functions I need in a CRM.

Surely others have encountered this and there must be something one can do? Thanks.

Is there any plan to either offer different editors with SuiteCRM or remove the default stripping out of HTML tags done by tinyMCE? I think this is quite ridiculous and is really starting to make me consider I’ve wasted a lot of time I’ve invested in SuiteCRM. I’m having to export my contacts and leads into PHPlist just to send out emails using my responsive template that I know won’t get messed up. That’s duplicate work for something that should be quite simple and exist in any decent CRM: the ability to send out emails using responsive email templates and NOT have to worry about them getting messed up. Thanks.

I experienced the same issue a couple months ago. I spent tons of time mucking around the source code to disable TinyMCE’s tag stripping “feature” and couldn’t get it to work. Also, it wasn’t even upgrade safe. TinyMCE doesn’t just strip tags, it actually removes anything between the tags.

What I did do for responsive templates was use a CSS-inliner to take my styling from the head and inline it throughout the document. It wasn’t perfectly responsive, but it was good enough. Depending on the complexity of your styling it might be perfect for you.

I did inline my template but that didn’t make any difference.

I have solved it so:

-> Copy from the folder “modules/EmailTemplates/” from old CRM Version to the new in to the same folder structure

Don’t forget to back-up the old version:

-> You Can rewrite EmailTemplates to EmailTemplates_BAK for example.

And you get the old HTML Editor back…

Apologies for the res but did anyone work out how to resolve this?

ecoonline did that work out well for you?

I quit using the email system in SuiteCRM for my marketing after wasting a lot of time. I feel this is basic functionality which really cripples SuiteCRM in my opinion. Have not revisited this since. I use PHPList for my emails. It’s duplicate work managing contacts in both places but at least it works without messing up my email template.

I did see some changelog about HTML5 email templates or something like that. Can anyone confirm that CSS is not being stripped anymore or is it still the case?

Hi friends,

This type of thinks maker suiteCRM great… because creates the need for a developers… us.

You cant edit /modules/EmailMan/EmailMan.php in function sendEmail() you can “HACK” your custom solution.

Albert from Tarragona.

1 Like