How can I set Chrome to let mailto: links be handled by Outlook.com?
It's a bit of a convoluted process, but you can do it using navigator.registerProtocolHandler
and a web site that rewrites the URL's query string a little.
Go to http://terrific-charger.glitch.me. This is a tiny Glitch project I wrote for which the code is below, but you can verify there is no hanky panky here: https://glitch.com/edit/#!/terrific-charger?path=script.js:1:0.
Open the Chrome console (ctrl+shift+j), then paste the following code into it and hit enter:
navigator.registerProtocolHandler('mailto','http://terrific-charger.glitch.me/?mailto=%s','Outlook.com');
Chrome will now tell you that "http://terrific-charger.glitch.me/ wants to Open email links". Click "Allow". That's it!
To undo the new behavior, go to: chrome://settings/handlers
, and remove the listed handler using the three-dot menu.
Glitch code:
if (location.search.length)
location = 'https://outlook.live.com/default.aspx?rru=compose&to=' +
decodeURIComponent(location.search).slice('?mailto=mailto:'.length).replace('?','&');
My comapny has Office 365 and the online Outlook is hosted at https://outlook.office.com/. To set this site as e-mail handler in Chrome:
- Open the web mail site
- Open the Chrome console (ctrl+shift+j)
- Copy the following line in the console and hit Enter:
navigator.registerProtocolHandler("mailto", "https://outlook.office.com/?path=/mail/action/compose&to=%s", "Office 365");
If you change your mind open chrome://settings/handlers
and remove the listed handler using the three-dot menu.