HTML Email Development
The site Good Email Code provides very good sample codes for html emails with detailed explanations.
Use this sandbox on tfw-test to develop email templates.
Use this mailer on tfw-test to send out emails.
The issues in HTML Email development (see Ref.#1)
- Gmail’s app still doesn’t support the
<style>tag for non-Gmail accounts- The Gmail app is massively popular on iOS and Android. But viewed in the Gmail app, emails for non-Gmail accounts don’t support
<style>tags, so media queries, which we can usually rely on to optimise our emails for small screens, aren’t supported.
- The Gmail app is massively popular on iOS and Android. But viewed in the Gmail app, emails for non-Gmail accounts don’t support
- It’s really hard to keep on top of email services and their level of CSS support
- New email providers and apps appear all the time. Some of them have great CSS and media query support, but some of them focus more on email workflows and don’t support
<style>tags or media queries at all. Some of them differ across platforms – for example, the Yahoo mail app for iOS supports<style>in the head, whereas on Android it doesn’t, unless you include your entire<head>twice, which isn’t possible from every sending platform.
- New email providers and apps appear all the time. Some of them have great CSS and media query support, but some of them focus more on email workflows and don’t support
- Using traditional methods like
floatoralignto create columns results in unsightly stacking on mobile apps without media query support - When you use
floatoralignto create columns, you lose the ability to vertically align them - When you use
floatoralignto create columns, you have to place them in separatedivs or table rows, so they can’t flow and stack naturally at different screen sizes
Reference
- Creating a Future-Proof Responsive Email Without Media Queries (2020-12-17)
- Client issues & fixes, CSS Left to Right, Column-reverse
- Creating a Simple Responsive HTML Email (2021-02-03)
- Ghost table, [if mso], fluid hybrid method
- Responsive HTML Email Template with HTML Tables & CSS – Ecommerce Layout – Youtube
- Responsive HTML Email: First Steps (2020)
- How to Create an HTML Template That Email Clients Render Well (2018)
- Good Email Code (M. J. Robbins)
- How to Send Email Using PHPMailer (2021) & Gmail SMTP
Tools
- PutsMail – a free email testing tool
- CSS inliner Tool
- PHPMailer Library
