Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modern HTML Email Development

othree
August 25, 2016

Modern HTML Email Development

othree

August 25, 2016
Tweet

More Decks by othree

Other Decks in Programming

Transcript

  1. Text Email • Older than WWW • SMTP 1982 •

    Lots of use in Japan • Japan feature phone ecosystem • Still very popular today
  2. HTML Email • Lots of table • Lots of inline

    style, no shorthand • Lots of Microsoft stuff • -ms/mso prefixed style • mso conditional comment
  3. Mail Clients • Gmail on web • Gmail on Android

    • Gmail on iOS • Outlook • Apple Mail • Apple Mail on iOS • Thunderbird • Lotus Note • Blackberry • …
  4. Desktop Mobile Web buggy CSS support need table layout need

    responsive layout best CSS support not allow <style> need sandbox
  5. Buggy? • No <style> tag in web mail client •

    No <style>, no media query • No float layout
  6. More Problems • Lots of environment • Uncommon behavior •

    No debugging tool • No document • No standard
  7. Why no Standards • Mail client didn’t complete follow entire

    web standards • For security reason • For application size • Use customized engine or webview
  8. Coding Mobile First Email • Basic layout, 3 level of

    <div> • Media query and display: table; for desktop standalone • Special hack for outlook.com • Conditional Comment <table> for outlook • CSS Calc for web client responsive
  9. Document • No standards • But we have lot of

    document wrote by pioneers • Nettuts+ • Campaign Monitor • Litmus
  10. Will It Work • CSS Support • Email Design Guidelines

    • Email Client Stats • Video in Email • Best Widths • Image Blocking • Using Forms in Email • Alt Attributes • Flash in Email • Symbols in Subject Lines • Web Fonts
  11. Premailer • Preflight for HTML email • Convert to inline

    style • Relative to absolute URL • Check CSS compatibility • Create plain text version • Open Source Project
  12. Litmus • The most powerful mail preview service • Mail

    test/checker • Mail analysis • Paid service
  13. MJML • Mailjet Markup Language • by Mailjet • A

    new markup language for HTML email
  14. What is MJML • A new markup language • Component

    with layout meaning • Render to HTML with all necessary tags, inline style, conditional comment
  15. Behind the Scene • Based on React • Easy to

    extend • MJML app by Electron
  16. Advantages • No need to understand mail client issues •

    Easy to learn • Easy to edit and preview with App • Open source • Extensible
  17. Disadvantages • Hard to customize • Component is not enough

    now • Possible to extend or use raw HTML • Some style will be remove • ex: gradient background
  18. Q&A