Remming

Using Firefox as the Default Mail Client on Windows 10 (with Fastmail)

Moving away from the Google ecosystem where “everything just works”, you sometimes end up missing the little things, like being able to click a mailto link and making it open in Gmail (or Fastmail in this case).

Why doesn’t Firefox enable these features by default, I have no idea, but it’s quite easy to do manually.

As the information to get this working was gathered from multiple sources (many of them very old), and modified to work, I decided to publish this to the internet in hopes that I’ll help someone’s day a little bit.

Open regedit (Win+R, type regedit, press enter), then add a registry entry with string value mailto under

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Firefox-1A2B3C4D5E6F\Capabilities\URLAssociations

with a value of FirefoxURL-1A2B3C4D5E6F. Where the Firefox-1A2B3C4D5E6F and FirefoxURL-1A2B3C4D5E6F are unique to your system, but the end is the same (e.g. 1A2B3C4D5E6F is the same on both places).

Or you can just run the following PowerShell script as an Adminstrator.

1
2
Set-Location HKLM:\SOFTWARE\Clients\StartMenuInternet\Firefox*\Capabilities\URLAssociations\
Set-ItemProperty . mailto (Get-ItemProperty . http)

If you now open the settings app, and navigate to Apps > Default Apps, you can select Firefox in the email section. If you’ve already configured your web email provider with Firefox you’re done, if you use Fastmail see the next section.

Adding Fastmail to Firefox Application as mailto Handler

Press Ctrl+Shft+I to open the inspector, navigate to the console tab, and copy-paste the following snippet to it.

1
2
3
4
5
window.navigator.registerProtocolHandler(
    'mailto',
    'https://www.fastmail.com/action/compose/?mailto=%s',
    'Fastmail'
)

This will add Fastmail as a mailto protocol handler, allowing it to be opened whenever you click a mailto link, now you just need to configure it as the default in Options > General > Applications.

Sources

The two primary sources for me to get this working was an answer to a question in the Microsoft Community from 2017, and a random blog post from 2011. All of these of course found through Google.