Set Chrome to handle mailto protocol

Last week I tried sharing a page using the site’s 3rd party sharing widget. This widget tried to open an email link but neither my computer nor my browser was configured for the mailto protocol, so I found a temporary workaround. Now I’ve found a real fix, so I’m documenting it.

I first tried going through the normal procedure of going to gmail.com, then in Chrome, opening: menu > settings > privacy (advanced) >content settings > handlers > allow > click “manage” button.

This should normally display a dialog window with a dropdown for various included protocols. From there, you just select the mailto option for mail.google.com, or whatever your mail server is (make sure to update the url/protocol where appropriate). Unfortunately, that setting wasn’t available when I tried, but I found this solution:

javascript:navigator.registerProtocolHandler("mailto","https://mail.google.com/mail/?extsrc=mailto&url=%s","Gmail")

To use this, copy and paste it into your address bar. Before you press enter, make sure javascript: (including the colon) is in the URL. Chrome will remove text it thinks shouldn’t be there, so if it has been removed and you don’t replace it, this won’t work.

What’s really cool is that this works for other protocols. For example, if you want to use the webcal protocol for opening google calendars, simply go to your calendar and type this into the address bar:

javascript:navigator.registerProtocolHandler("webcal","https://www.google.com/calendar/render?cid=%s","Google Calendar")

Same copy/paste caveat holds true here too. I hope this helps!

Leave a Reply