How can you create a mailto application?

I noticed that Firefox comes with Yahoo and Gmail emails as the default mailto options in the Firefox settings application section. I use Outlook webmail, so I’m looking to create an extension to add the Outlook webmail to the options, but I don’t know how.

I know you can really easily create new search engines for Firefox, so I would assume that creating a mailto option wouldn’t be difficult and would probably run along the same lines.

Any ideas how?

Last time I checked, neither Outlook nor Yahoo behaved correctly when sent the mailto: parameters in the format Firefox uses. So best I could do was right-click integration:

If you don’t want to use an existing solution, the web ext API is https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers

If you’re a website that wants to offer this, use https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler

1 Like

@freaktechnik Exactly what I was looking for! Can’t believe I missed that in the documentation. Thanks!

@jscher2000 Yahoo email comes as a default option in Firefox now.

Yes, but clicking an email link using the built-in Yahoo handler generates this URL:

https://compose.mail.yahoo.com/?To=mailto:friend@example.com

Yahoo doesn’t transfer the address to the new message compose form. But we have WONTFIX here: https://bugzilla.mozilla.org/show_bug.cgi?id=1494105

So I created the extension and it sends this instead:

https://mrd.mail.yahoo.com/compose/?to=friend@example.com

Hello @jscher2000,

could you please share this extension as we’d like to create a similar extension for a local webmail infrastructure?

Regards, Guenther

If your internal email is an Outlook-based email, i made this extension, which should work in most cases. https://github.com/WesleyBranton/Outlook.com-mailto

Otherwise, feel free to adjust that one to meet your needs. It’s very specific to Outlook email, but you should be able to adapt it to suit your needs.

I’m not sure what you mean by “share”? The links to the extensions’ source code repositories are on the left sides of my pages on the Add-ons site (“Homepage”).