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