Set Gmail as Default Email Client for Chrome, Firefox, and Safari

Feb 9, 2012 - 23 Comments

Gmail as the default email client

Clicking an email link in a web browser defaults to launching Mail.app, which is great if you use Mail but not so great if you use webmail services like Gmail. This is fairly easy to resolve, though you’ll have to configure it separately on a per-browser basis, with different methods for Firefox, Safari, Chrome, and Opera.

Set Gmail as Default Email Client in Chrome and Opera

  • Launch a new browser window and open up Gmail
  • Open the Javascript console by hitting Command+Option+J and then paste in the following:
    navigator.registerProtocolHandler("mailto",
    "https://mail.google.com/mail/?extsrc=mailto&url=%s",
    "Gmail");

  • Accept the confirmation at the top of the browser window and try out a mailto link

Gmail as default email in Chrome

This can be undone or changed again by going to chrome://settings/handlers and adjusting the setting as appropriate.

Use Gmail as Default Email in Firefox

  • Open Firefox Preferences
  • Click on “Applications” tab
  • Locate “mailto” under the ‘Content Type’ tab and change the action to “Use Gmail”
  • Close out of Firefox Preferences

Gmail Default Email with Firefox

Switching back to the default behavior is just a matter of selecting Mail again as the action.

Using Gmail as Email Default in Safari

Safari users can either use a browser extension called GmailThis available from Apple’s extensions gallery, or can use apps like Gmail Notifier which we have discussed here before for it’s menu bar alerts. After Google Notifier has been installed:

  • Open Mail Preferences and click on “General”
  • Pull down the “Default email reader” and locate ‘Google Notifier’
  • Quit out of Mail.app

Older versions of Mac OS X can use WebMailer as well, but Google Notifier is the most reliable.

Heads up to HTML5Rocks for the Chrome tip.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks

23 Comments

» Comments RSS Feed

  1. Mark says:

    I wish there was a central place to control other default settings like this. Although in iOS we don’t have any such choice either, it’s Mail and Safari :)

    • Nick says:

      The same reason Microsoft had an antitrust suit you mean? Now that Apple is on top, don’t be shocked if they get hit with the same thing and we get such choices in future iOS releases.

  2. Owain says:

    Brilliant – I loves it! Thanks for the tip!!

  3. iGnome says:

    Fantastic! I had this set up in Firefox but I moved to Chrome a while back. The number of times I click an e mail link and then realise Mail has opened up and is trying to download thousands of e mails. Great tip, Thanks

  4. David says:

    It may be obvious to everyone buy me; but where does the pasted material go in the Chrome Javascript console? There is a window with material in it on top and a window below it that has a carat and an html and body tag above the carat. Then over to the right there are more windows. Which one gets the pasted material??

    • Brad says:

      Hi David,

      It really isn’t obvious at all for anybody without html familiarity. The poster should add this step to make the solution more clear for all. You need to be in the “Console” to paste the code.

      *After entering CMD+OPT+J, notice to the right of the “x” where you can close out, a series of choices: “Elements, Resources, Network…etc…Console”. Click the “Console” and paste the code to the right of the “>” symbol and then close out. Then, as the above directions show, Gmail will then prompt to accept the confirmation at the top of the browser window.

      • lola says:

        I still don’t get it. What is a console? I HATE HATE HATE microsoft outlook and can’t email anybody with google chrome. This is so confusing!!

  5. [...] works in Safari and Chrome only, and will open the new email draft in Mail by default. If you have Gmail set as your default email client that will open in a new window instead. stLight.options({ [...]

  6. Alex says:

    for safari, it’s not gmailthis, it’s gmailto

  7. Christi says:

    Thank you!

  8. Stephanie says:

    yes!!!!! Finally I have what I need. So tried of copy and pasting. TY very easy to understand

  9. phoenix says:

    The Gmail in Chrome example code does NOT work with Chrome on Mac OSX Mountain Lion. Any update?

  10. chris says:

    I agree with phoenix, this doesn’t work when trying this on Chrome on Mountain Lion, is there a fix or update?

  11. Matt says:

    I cannot get this to work. I paste it in the console, close it, and go to gmail and I still get no message. Im using chrome on windows 7

  12. Scott says:

    +1 – Using mountain lion 10.8.1 and latest version of chrome. when clicking a mailto the Mac Mail comes up. If you change the settings in Mail Mail to Chrome for being the default mail program, then NOTHING happens when you click the mailto link. How can this be fixed?!?!?!?

  13. Hermann says:

    im trying to do this in chrome, but i do not get prompt for anything once i paste the code.

    can someone please help. theres also no defined handlers in chrome’s handlers settings.

  14. Lee says:

    +1 @Scott, Chris and Phoenix. This fix does not work for Chrome on OSX Mountain Lion (10.8.2)

  15. rob says:

    mine just says – undefined

  16. David David says:

    I have the same issue as Rob – it just comes back with “undefined” – I’m on a new pc with Windows 7. Would much appreciate advice. Thanks!

  17. [...] will be handled right through Contacts, unless you have Gmail or webmail configured as your default Mail client in OS X and choose the Email option, which will upload the vcard to the appropriate webmail client [...]

  18. Skip says:

    If you aren’t getting results from the the above, you could try this. Copy and paste it into the omnibar (url bar).

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

    For this to work you may have to open preferences (chrome://settings) and then click the ‘Show advanced settings’ link at the bottom. Next click on ‘Content settings’ under the Privacy section. In the window that pops up, under Javascript, choose Allow… and under Handlers also choose Allow… Then click OK. Paste the javascript above into the omnibar again and press Enter.

  19. Jaimy says:

    Thanks Skip! The last one works for me.

  20. grrrshn says:

    I do not have the Mail app configured. Then what…

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates