Tuesday, October 23, 2012

Using Gmail as a Mailto: Client

I had an interesting request come in; "When I click on a link to mail someone, Outlook pops up. Can it go to Gmail instead?"

My very first thought was to wonder if it's possible, given that normally when you click on a mailto: link Windows will launch your default mail application. Gmail is a website...not an application.

My second thought was, "Of course it can open another web page."

And it really is quite simple. Here's how to do it using Chrome as the web browser.

Open Regedit.

Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailto\shell\open\command\ and be sure you look for "mailto", not ".mailto". That period makes a difference when you can't find it in the list alphabetically.

Change the (default) entry to:

“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” https://mail.google.com/mail?extsrc=mailto&url=%1

If you want the message composition page to open in a new tab, or use:

“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” –app=“https://mail.google.com/mail?extsrc=mailto&url=%1

...if you want the message composition page to open in a new window

Notice that the path to the Chrome executable may have to be changed depending on where it's installed. Chrome can be installed in a user's profile or in the system for everyone to use. Test it out on a webpage with a mailto: link, and it should work right away, no reboot or re-login necessary (which is great because if you typo it, you can edit the alteration immediately right from Regedit before closing it out.)

No comments:

Post a Comment