top of page

How to Use registerProtocolHandler to have Gmail handle all mailto links

If you use Gmail you may become frustrated when you click a mailto: link by accident and now your desktop client of Outlook or Mail starts up.

Thanks to navigator.registerProtocolHandler() you can wire up Gmail as your default mail client for all mailto: links in Chrome and Firefox.

Here's how:

First, open up a Gmail tab. You must do this from the Gmail tab.

Open your javascript console (cmd-opt-j on Mac, ctrl-shift-j on Windows) and enter:

and enter:

navigator.registerProtocolHandler("mailto", "", "Gmail");

Accept the confirmation from the browser.

This is how you can cross check in the settings.

Click this mailto: link to test out your new Gmail mailto hookup!

45 views0 comments

Recent Posts

See All


Post: Blog2_Post
bottom of page