Why I Built a Custom Electron App Just to Use iCloud Mail

I run dark mode everywhere macOS, browser, editor, terminal. At this point its not really a preference anymore. Bright white screens for hours genuinely strain my eyes.

That setup worked perfectly until I started using Hide My Email, Apple’s privacy feature that generates random relay addresses for signing up to services.

The problem appears when using Hide My Email with the native Mail.app.

Mail.app struggles to send mail from Hide My Email aliases. Sometimes it works, but most of the time it doesn’t, making the behaviour highly unpredictable.

Parkinson's Law

There is an open issue on the Apple community forums discussing this exact problem.

The root cause is fairly straightforward.

Mail.app expects outgoing mail to be sent using SMTP credentials associated with the sending address. But Hide My Email addresses are not normal mailboxes, they are relay aliases managed by Apple’s servers. That means that the alias address exists, the incoming mail works but SMTP authentication for that alias does not exist. So when Mail.app tries to send mail using that address, it fails.

In contrast, the iCloud web interface works perfectly because it sends mail through Apple’s internal infrastructure rather than SMTP.

Apple’s own documentation effectively nudges users toward using the web interface for Hide My Email.

Unless Apple addresses this limitation in Mail.app, the only reliable option is to use iCloud Mail in a browser. However, this introduces a different problem: dark-mode rendering of email HTML.

When you write an email in dark mode, the text is rendered as white, regardless of the mode the recipient is using. As you can imagine, this becomes problematic if the recipient opens the email in light mode, the message appears blank! To reveal the text, the recipient must manually highlight it, which is obviously not ideal.

Parkinson's Law Parkinson's Law

Conversely, text written from a light-mode client appears dark when opened in dark mode.

Parkinson's Law

After researching the issue, I realised there is no reliable fix for this behaviour.
That left me with two practical alternatives:

  1. Switch my browser back to light mode
  2. Use a non-default browser in a light mode exclusively for iCloud/mail

Neither option seemed ideal.

Running a separate browser just for mail felt like an oversized solution. It also lacks native integration i.e., there are no Dock badges for unread emails, which means constantly checking the browser window manually.

The Solution: A Tiny Electron Wrapper

What I wanted instead was something that:

  1. didn’t force me to switch my entire browser to light mode
  2. behaved like a standalone application
  3. supported notifications and Dock badges
  4. opened iCloud Mail without browser tabs

So I built iMail, a small Electron application that wraps the iCloud Mail web interface while permanently locking it to light mode.

The result behaves like a normal mail application while still using Apple’s web infrastructure under the hood.

This completely avoids the email rendering problem.

Parkinson's Law

You can check out the project on my GitHub, where you’ll find instructions for building the DMG installer yourself.

The entire project is roughly 210 lines of JavaScript.

In conclusion, sometimes the simplest solution isn’t fixing the system but it’s isolating the part that works.

Show Comments