Open ben-z opened 1 day ago
This post suggests that using base64 images will cause compatibility issues: https://www.reddit.com/r/email/comments/18ggyg1/is_attaching_an_image_as_base64_bad/
This post talks a lot about dark mode: https://www.litmus.com/blog/the-ultimate-guide-to-dark-mode-for-email-marketers
Apple Mail has a few exceptions to this: First, plain text emails do trigger the application of a Dark Mode theme, and the minimum code that blocks Dark Mode from applying to a plain text email is a 2×1 image—this is to ensure that you can include a 1×1 tracking pixel while retaining a “plain text” feel.
Currently, emails in this repo that include external images (e.g. the WATcloud logo) appear to prevent the macOS mail client from automatically turning the email dark.
I have an email here that does support dark mode. Let's study it and see how we can make our emails more similar to this.
mail-source.txt
This email uses attached images, and the macOS mail client seems to be happy to turn on dark mode for this.
Note: this email is made up of multiple parts, with a header and a base64 blob for each. The header looks like
In the HTML, the img tag is as follows:
It references using
cid:789cb1458a353fe6fb1e@notify.proton.me
, which corresponds to a piece of data that appears later.