Can not use email templates

I am on Version 7.8.6

I cannot create custom email templates

The templates changes significantly from the hmtl code

example:


<td>
<p> 
some text here 
<br />
more text here
</p>
</td>

becomes:


<td style="font-family: &#38;Segoe UI&#38;, &#38;News Gothic MT&#38;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin: 0px; background-color: rgb(255, 255, 255); color: rgb(45, 64, 80); padding: 3px 3px 3px 0px;" data-mce-style="font-family: 'Segoe UI', 'News Gothic MT', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin: 0; background-color: #fff; color: #2d4050;" valign="top">5.30pm to 8.30pm, <br style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22.4px; color: rgb(68, 68, 68); padding: 0px; margin: 0px;">Thursday 10 May 2018</td>

<td style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22.4px; color: rgb(68, 68, 68); padding: 3px 3px 3px 0px; margin: 0px;">
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22.4px; color: rgb(68, 68, 68); padding: 0px; margin: 0px;">
some text here 
<br style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22.4px; color: rgb(68, 68, 68); padding: 3px 3px 3px 0px; margin: 0px;">
more text here
</p>
</td>

even if i try:


<td style="font-family: 'Segoe UI', 'News Gothic MT', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; color: #444444; padding: 5px 0px; margin: 0px;">

the html will become



<td style="font-size: 15px; line-height: 24px; color: rgb(68, 68, 68); padding: 3px 3px 3px 0px; margin: 0px; font-family: Arial, Helvetica, sans-serif;"
data-mce-style="font-family: 'Segoe UI', 'News Gothic MT', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; color: #444444; padding: 5px 0px; margin: 0px;">

issues i have:

All my padding: get’s overwritten
My styles goes to data-mce-style
and
new style properties gets created

things with padding: 0px
becomes 3px 3px 3px 0px

all fonts get’s overwritten

What is going on???

Does anyone else have this problem?

I have tried

  1. Adding the html directly into the database - does not work - the email formatting happens when I send the campaign
  2. Disable some purifyhtml triggers: //$this->$key = SugarCleaner::cleanHtml($this->$key, true); in SugarBean.php
    (#2 work until i send the email - I can now edit but sending again changes the html even in the HTML)

This makes email campaigns unusable

see:
https://suitecrm.com/suitecrm/forum/feedback/14487-bug-html-template-editor-removes-html-suitecrm-7-9-0#63164

When i attach an email template to a campaign the template automatically opens in TinyMCE EDIT mode

TinyMCE then:

  1. strips my styles
  2. puts it in a data-mce-style property,
  3. creates it’s own style tags
  4. even on html elements like the BREAK-tag
  5. saves it

https://community.tinymce.com/communityQuestion?id=90661000000IfQOAA0

A solution might be for me to go into the campaign record in the database and attach the template manually with sql

I do not believe this is correct behaviour of SuiteCRM

even


<td style="color:#fff;background:#E71425;padding: 15px 5px;">
<a style="color:#fff;" href="%7BRSVP%20accept%7D">RSVP accept</a>
</td>

<td><a></a></td>

becomes


<td style="color: rgb(255, 255, 255); background: rgb(231, 20, 37) none repeat scroll 0% 0%; padding: 3px 3px 3px 0px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22.4px; margin: 0px;" data-mce-style="color: #fff; background: #E71425; padding: 7.5pt 7.5pt 7.5pt 7.5pt;">&nbsp;&nbsp;<a style="color: rgb(255, 255, 255); font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22.4px; padding: 0px; margin: 0px;" href="%7BRSVP%20accept%7D" data-mce-href="%7BRSVP%20accept%7D" data-mce-style="color: #fff;">RSVP accept</a>&nbsp;&nbsp;<br data-mce-bogus="1" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22.4px; color: rgb(68, 68, 68); padding: 0px; margin: 0px;"></td>

<td><a></a><br /></td>

adds BREAK tags inside table-cells

this is messed up…

I stopped using the interface and started doing this directly via phpMyAdmin. But ofcourse that’s a ridicilous situation. I love Suite, but anything mail-related is unreliable as f*ck

Do you still get these issues in 7.8.18? There were many bug fixes since your version,and I remember a few were related to what you’re experiencing.

I am only now experiencing it - needing to launch a new campaign. Loosing a lot of time!! Will update after this campaign and see if it is fixed. I am loosing my patience with SUITE…

My fix is to create a template
Then go through the wizard and choose the template
Place the unique target TRACKERS to get the replacement code
copy the html in NAVICAT or PHPMYADMIN into the html field of the template field: email_templates>body_html
Set the campaign to email later
Then either:
A: Create a new template and replace it in the link to the particular email_marketing table field for template_id
or
B: overwrite the html email_templates>body_html_field with my Dreamviewer created html after completing the wizard to overwrite changed email_templates>body_html
because the WIZARD opens the editor asking for SAVE which dramatically changes the email HTML - BASED ON HTML FROM FRAMEWORKS LIKE Bootstrap or Foundation

this sends the correct HTML

Ask me if you need more info

Ok, thanks for sharing the work-around. My concern will be only if you tell me this issue is still present in the newest versions, so when you do get a chance to upgrade please report back here if it’s still broken. Thanks.

I use navicat
you can use phpmyadmin or MySQL Workbench
you can use this with a server or amazon - I am moving to AWS
you go through the wizard creating a campaign
tell the campaign to send 12pm tonight
you have time to change the template

open the table:
email_templates

in your mysql tool (navicat, phpmyadmin, mysql workbench)

copy your perfect html code from DREAMWEAVER or whatever into the table field ‘body_html’

save

never touch SUGARCRM wizard again

I created 2 link trackers

www.url.com/?accept=decline
and
www.url.com/?accept=accept

which translate to

RSVP accept
RSVP accept

SUGAR does a perfect replacement with the correct campaign ID and user ID

I then after the wizard copy the code back into the database - not using sugar at all

OR

change
email_marketing > template_id

for another template entry I have not touched with Sugar’s WYSIWYG editor

it works now

BUT EXTREMELY TERRIBLE

if you need more please ask me to send a YouTube video of the process - if I get enough request I will…

I am giving up on the html capabilities from Suitecrm, cannot disable html purifier, cannot send a decent responsive email, directhtml is still “purifying”