Jump to content

[Locked]Default email styling not working in Gmail


visiba

Recommended Posts

We're using WHMCS v6.3 and applied the "default" email template styling as defined here:

http://docs.whmcs.com/Email_Styling

 

However, when an email is sent to a Gmail address, the formatting is not working in the Gmail client. I tested the same email to a Hotmail address and it's showing fine there.

 

There must be something which is not compatible with the HTML/CSS layout Gmail expects and therefore not showing correctly.

 

Anyone else having this issue?

Edited by visiba
Link to comment
Share on other sites

I am seeing something similar. I don't think it is just gmail. We see it going to hotmail as well so I would double check that.

 

It looks like the "Global Email Header" field is missing.

 

Emails to Administrators are in the correct format and do have all the correct email header information. Emails to Clients don't. Our administrator emails also go through gmail so it's not a gmail thing as far as I can tell.

 

The "Client Email Header Content" field is there but that changes things further down. I think it is the "Global Email Header" field we need access to in order to correct this and it is not there. I have tried clearing template cache and rebooting and using a different browser and clearing that cache as well.

Edited by mustardman
Link to comment
Share on other sites

It does look good on Hotmail here, but not on Gmail. Attached 2 printscreens which explain the problem.

 

Hotmail:

[ATTACH=CONFIG]10602[/ATTACH]

 

Gmail:

[ATTACH=CONFIG]10606[/ATTACH]

 

I think Gmail strips <style> tags. So that may be your problem.

https://litmus.com/blog/understanding-gmail-and-css-part-1

 

I solved my problem by cutting/pasting the Global Header content from the link in your original post into my Client Header field. So I think my problem was different.

Edited by mustardman
Link to comment
Share on other sites

WHMCS confirmed this as a bug and has opened case CORE-9947 to have this fixed.

 

- - - Updated - - -

 

I think Gmail strips <style> tags. So that may be your problem.

https://litmus.com/blog/understanding-gmail-and-css-part-1

 

I solved my problem by cutting/pasting the Global Header content from the link in your original post into my Client Header field. So I think my problem was different.

 

Interesting, although I don't understand what you did to fix this. What's the difference between global header content and client header content? I don't see a global header content field.

Link to comment
Share on other sites

  • 7 years later...
  • WHMCS Technical Analyst

In case anybody else encounters this issue, it is caused by Gmail not liking <style> tags, and preferring that styling be done with inline CSS.

This is not something that we can really 'fix', as we would prefer to retain customisation options for our clients, however you might be able to get around this by implementing an automatic inliner within an action hook:
https://github.com/tijsverkoyen/CssToInlineStyles

On 07/04/2016 at 06:14, visiba said:

WHMCS confirmed this as a bug and has opened case CORE-9947 to have this fixed.

This case was closed, as this is not something that we can really resolve.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated