-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not render as shown in Gmail or Outlook #2
Comments
If I download the email and view the source this is how it looks:
|
I have done some more research and it seems these email clients do not support style tags so whilst it did actually work ok in Outlook on an iPhone, everything else I tried it ignored all the CSS. I did find a workaround which was to use this CSS inliner tool on your template and now the email works in all clients: Is this the recommended approach as I can see lots of other HTML email templates also use style tags? Or am I missing something? Thanks though as after inlining your template it was just what I was after. |
Hey Same behaviour, the render is not good in Gmail, Hotmail or Yahoo. I have not the line under titles :( |
@robinwilson16 @charlottederome-git It does appear that CSS inlining is pretty important / mandatory. This other repo mentions the need for it, and mailchimp itself addresses it and offers a tool to convert. FWIW, it appears supporting regular css may be increasing. Here's a 2018 report on trends related to email clients and inlining. |
I don't want to be rude, but these are not email templates and should be not labeled as such. They don't work in most of major email clients. This is just a waste of time. |
@mrbrdo Did you perform the CSS inlining discussed above? |
@banagale yes, but an "email template" shouldn't require that, it should be adapted for emails, which this isn't. And obviously the code from the inlining tool is awful looking. |
Yeah I'm kinda upset these are called email templates. They are websites 🤷🏻♂️ |
Gene, maybe you could explain your use case a bit more. These are HTML email templates intended for transactional emails. They are intended for integration by developers. The content is inserted programmatically, and sent via services like Amazon SES or Mailgun. Regarding Jan's comment wondering why inline css might be a requirement: this is an industry-standard expectation (see also mailchimp's guidance) for ensuring styles show up most email clients. As for the code looking awful, I recommend inspecting the code on great looking emails from services you receive from regularly. It isn't intended to be pretty because it is not intended to be seen. One more note, this work is open source. If it does not meet your needs, it is reasonable to create a fork or build your own library that does and release it for free use as well. Others may benefit from the changes that fulfill requirements you have, and hopefully encourage you to offer more of your work to the public at large. |
@banagale I will give you the point about inlining css. However even after doing that, you are using rgba colors (for no obvious reason), which it seems do not work in Zoho Mail. I really don't see the point in using rgba colors in the use cases (font on white background or font on grey background), especially keeping this incompatibility in mind. |
Glad to hear the references were helpful. This is not my project. My feedback was to help you and other people who come across this thread have information they need to make an informed decision about what these templates are and what is normal. As for concerns about incompatibilities, I’d point to my previous comment about this being programming and open source. If you’re aware of an incompatibility, fork the repo make a branch containing the rgb to hex conversions and submit it as a pull request. If you don’t have time or aren’t sure how, write up an issue describing what could be done. If you use polite language, perhaps someone will create the PR and the maintainer will merge it. |
I tried email template 1 but it does not render the same in Gmail for me and just seems to be ignoring the CSS. It doesn't render correctly in Outlook either.
Am I doing something wrong?
Here is what it looks like in Gmail:
This is Outlook:
Is there any modification I can make to get it to work?
Thanks
Robin
The text was updated successfully, but these errors were encountered: