Reputation: 301
I know that's full of questions and answers about this in general, but somehow I can't find what I need anywhere.
The point is simple: I need to send an HTML email template manually from a client and it should be well rendered in most clients, including Outlook.
For tests, I'm using the StackOverflow Promotional Template (https://stackoverflow.design/email/templates/promotional).
But I can't find a way to "keep" the conditional statements through the clients: if I open the code in Chrome and copy/paste in my client, it ignores (correctly) the Outlook condition, so when I send the email to an Outlook client it's not displayed correctly. If I open the code in Word instead, it applies the condition, but when the mail is sent every client will get that condition (not only Outlook).
I would like to let the destination client render the email, while now it seems that the sender one is getting the job done.
Thank you in advance for help.
Upvotes: 0
Views: 793
Reputation:
Sorry to say, but in your use case, you are effectively forwarding an email.
It may not seem it, but email clients... for example Gmail, are setup for plain text emails to be sent to each other.
To send a marketing email or a pretty (templated) email, you require an Email Service Provider (ESP).
Examples include Mailchimp, Campaign Monitor, Klaviyo, Hubspot and the list goes on and on and on.
So how exactly are you (almost) forwarding the email?
Since the likes of Gmail are set up for users to send plain text emails, when you drop a template into Gmail, the email has been built elsewhere and so the template is treated that way by Gmail. It isn't treated as an email that was built inside of Gmail, because that functionality doesn't exist.
The email is sent but the receiving mail clients (Outlook, Gmail, Yahoo etc.), will treat this as a forwarded email.
Forwarding emails is hugely detrimental to email code. Code such as your conditional code will be stripped, responsive code will be stripped (most of the time) and the list goes on.
You have two options:
Upvotes: 1