2
1 Comment

Zero Inbox can handle HTML emails now

Milestone: Zero Inbox can handle HTML emails now. There are some rough edges but it's good enough for today, and maybe even for the launch.

Many of us don't realize that a lot of the emails we receive are actually not plain text. They are HTML with CSS and everything. The HTML email uses a subset of the HTML tags and doesn't support JavaScript. But, that doesn't change the fact that if you are building an email client, you have to be able to render HTML.

This is easy if you are just building a web app. Web apps run in browsers and HTML rendering is the core functionality of a browser. It's not as easy if you are building a mobile app. Both Android and IOS offer a browser component that can be embedded in mobile apps - WebView in Android and WKWebView in IOS.

Spent yesterday wrangling the WebView/WKWebView library for Flutter. It was disappointing to realize that the official library (webview_flutter) lacks some important functionality, such as setting zoom and choosing a font-size. Especially because both WebView and WKWebView support this functionality. So, I ended up using a 3rd party library called (flutter_inappwebview), which still partly uses WebView under the hood I believe.

Another quirk I had to deal with was the layout needs of the WebView Flutter Widget. It really didn't like being in a container that gave it infinite height. I ended up wrapping it in a container that resizes itself after the WebView component is done rendering the HTML so that it knows about the height of the content. It's gross. I know 🤷‍♂️

, Founder of Icon for Zero Inbox
Zero Inbox
on November 4, 2021
  1. 1

    That's great. I always thought as to why html emails were using 90's web standards and the likes of google/microsoft who dominate the client market refuse to update the standard ; we're forced to useg MJML and other third party drag/drop utils litmus to make standard 3 column table!

    that being said;

    As developers we often focus on web performance squeezing every last KB from the final bundle, but we care less if our newsletter is 400kb - 700kb (thats like shipping 8 angular applications, 15 react applications, and 40 vue apps in one email!)

    Awesome that you now have a client (launching soon) that will solve these issues and have support for HTML, email compression is what i would focus on next perhaps :)