Set GMail as default mail client in Firefox

ADVERTISEMENT

Subscribe to RSS feed. Or, to get latest articles to your email inbox for free, enter your email address in the box below and click "Send me articles".

GMail is the among the most popular web email clients. If you are like me, you would like the convenience of having everything in the cloud and in sync, with no worries of lost emails in case of a crash.

However, one problem that has always nagged me is that you need GTalk to force mailto links (those which handle email addresses) to open in GMail. I can’t count the number of times I have clicked a mailto link, had it open Outlook Express (I’ve not bothered to change the defaults, nor do I use them) and then closed them in sheer agony.

The official GMail blog now recommends a quick tip to set Gmail as the default client in Firefox.

  • Login to your GMail account.
  • Paste the following line of code into the URL bar(address bar) of Firefox 3.

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

    Hit enter. A prompt will ask you whether you want to “add GMail as an application for mailto links?”.
    GMail in Firefox

    Click “Add Application. This will add Gmail as one of the options for opening mailto links. Now, go to Tools -> Options -> Applications tab and choose the options as shown in the screenshot below:

    GMail as default application in Firefox

    If you are a Google Apps user, use the following code instead(replace DOMAIN.com with domain name you registered Google Apps with):

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

That configures GMail as the default for mailto links. To test, you can click on this link (not a real email ID, but the link should help you test). This is the window that you would get when clicking on the mailto link:
GMail in Firefox example

Reverting from GMail to default in Firefox

If you want to revert the setting, go to Tools -> Options -> Applications tab and click “Always Ask”.

Related articles:
Comments are moderated - do not resubmit if it does not appear. If you have a tech question, please write it in this forum
required
required (will not be published)
Do not spam us!
Reader comments
  1. If you don’t like handling all this code :D, just Install Google Toolbar for Firefox and you are done.