I have an CSS style in an external file and the element refers to a the style using the 'class' attribute.
However, I can't seem to get the styling.
Email is notorious for being difficult to style in multiple clients.
For this reason, inline styles and tables are the norm for email templates.
As for loading an external asset, a lot of email clients won't do this for privacy reasons, to prevent the sender from determining if the email has been read by attaching a unique identifier to the URL.
http://example.com/assets/style.css?nonce=ac77f909
The system then checks the nonce against who it maps to, and can tell who is receiving/reading the email.
This is very useful for spammers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With