Home | News, SeaMonkey | Set Gmail as your email client in Firefox
-->

Set Gmail as your email client in Firefox

Published: July 5th, 2008
  •  Print

Firefox 3 introduces support for web-based protocol handling so instead of a desktop application taking care of irc:, im:, ftp:, mailto: and other protocol link, these addresses are passed to a defined web service provided that it is capable of parsing and processing them.

Firefox 3 ships with Yahoo! Mail and 30Boxes as bundled web protocol handlers (for email and calendars respectively) but you can easily add more as they become available.

Google for example added the necessary interface too short before the Firefox 3 release so it wasn’t included by default but you can change that.

First, you will have to enable registration of protocol web handlers from different domains.

  • Enter about:config in the location bar and press Enter to access the advanced preferences.
  • Look for gecko.handlerService.allowRegisterFromDifferentHost and double click it to set it to true.

Now click in the link below to add Gmail as a mailto: links handler.

Add Gmail as a mailto handler

You will be prompted with a confirmation info bar. Press Add Application.

You can now select Gmail as your mailto links handler from the Application page in the Options dialog.

Now when you click on mailto: links a new tab with a Gmail compose window will open. You can also or click on Send Link… in the File menu to send the current page address and title.

I suggest setting gecko.handlerService.allowRegisterFromDifferentHost back to false to prevent malicious web sites offering their own protocol handlers.

In case you need to remove Gmail as a mailto handler, in the Tools menu, select Options. In the  Applications page look for mailto in the content type column. Open the menu in the Action column and select Application Details…, select Gmail and press Remove.

Update: If clicking on the link to add Gmail still doesn’t work, access the advanced preferences (enter about:config in the location bar) and check that network.protocol-handler.external.mailto is set to true, its default value. If it isn’t double click on it to change it or right-click and select Reset.

You can leave a response, or trackback from your own site.

19 Comments on “Set Gmail as your email client in Firefox”

Subscribe to this post's RSS feed

  1. 1. Tim Schmidt
    July 5th, 2008 at 1:11 pm

    The javascript link to register it appears to be bad!

    [Reply]

  2. 2. Devon Young
    July 5th, 2008 at 1:27 pm

    I’m using FF3 and I changed that config value from false to true. I think the “Add Gmail as your default email client” link is broken. It didn’t pop anything up for me.

    [Reply]

  3. 3. Fitch
    July 5th, 2008 at 1:31 pm

    The link doesn’t work right now, can you check to see if this works?

    [Reply]

    Percy CabelloJuly 5th, 2008 at 1:53 pm

    Sorry about that. I’ve corrected it and is working now.

    [Reply]

  4. 4. clem
    July 5th, 2008 at 1:49 pm

    The javascript snippet is truncated. It currently reads as follows:
    javascript:navigator.registerProtocolHandler(

    [Reply]

  5. 5. Exec
    July 5th, 2008 at 1:51 pm

    Or, instead of changing around stuff in about:config, copy the link for “Add Gmail as your default email client” and paste it into the location bar in a tab with Gmail open and press enter.

    @Devon Young
    Any errors in the console? Tools -> Error Console (Ctrl+Shift+J)
    You might want to clear it before clicking the link.

    [Reply]

  6. 6. Tim Schmidt
    July 5th, 2008 at 2:21 pm

    I’m still getting a permission denied error even though I made the about:config changes…

    Error: [Exception... "'Permission denied to add http://mail.google.com/mail/?extsrc=mailto&url=%sas a protocol handler' when calling method: [nsIWebContentHandlerRegistrar::registerProtocolHandler]” nsresult: “0×8057001e (NS_ERROR_XPC_JS_THREW_STRING)” location: “JS frame :: javascript:navigator.registerProtocolHandler(’mailto’,'http://mail.google.com/mail/?extsrc=mailto&url=%s’,'Gmail’); :: :: line 1″ data: no]
    Source File: javascript:navigator.registerProtocolHandler(’mailto’,'http://mail.google.com/mail/?extsrc=mailto&url=%s’,'Gmail’);
    Line: 1

    [Reply]

    Percy CabelloJuly 5th, 2008 at 2:38 pm

    Tim, you may have network.protocol-handler.external.mailto set to false. Check it through about:config and ensure it’s set to true. I’ve updated the article to mention this.

    [Reply]

    Tim SchmidtJuly 6th, 2008 at 11:41 am

    Yep, that was it. No idea how that setting got that way but it worked like a charm now! Thanks, Percy!

    [Reply]

  7. 7. Alvin Brinson
    July 5th, 2008 at 4:25 pm

    Both about:config settings confirmed, the javascript still DOES NOT WORK - just opens a blank window.

    [Reply]

  8. 8. Alvin Brinson
    July 5th, 2008 at 4:27 pm

    Nevermind, it is working…

    I was clicking from the lifehacker article, which copied your previously broken javascript.

    [Reply]

  9. 9. Fitch
    July 5th, 2008 at 8:30 pm

    Works now, thanks! You might as well make it link to the https:// version of gmail instead of http, though.

    [Reply]

  10. 10. kev
    July 6th, 2008 at 8:29 am

    If you’re using Google apps (i.e. hosted Gmail for your domain) the compose URL is a little different. Just wanted folks who may use it to be aware that Google added it for the hosted domains, too:

    https://mail.google.com/a//mail/?extsrc=mailto&url=%s

    [Reply]

    kevJuly 6th, 2008 at 8:31 am

    Ack. please edit the url to https://mail.google.com/a/DOMAINNAMEHERE/mail/?extsrc=mailto&url=%s as the <domain> I included in the link got interpreted as a tag. :/

    [Reply]

  11. 11. steveballmer
    July 6th, 2008 at 7:17 pm

    Hotmail is much, much, mucho better!

    [Reply]

  12. 12. user
    July 10th, 2008 at 5:38 pm

    some kind of mixed up with links? i’m visiting this page at –> http://mozillalinks.org/wp/2008/07/seamonkey-1110-update-available-now/

    [Reply]

  13. 13. simon
    July 14th, 2008 at 12:16 pm

    Ditto as “user” (comment 12) title and address are mismatched.

    [Reply]

  14. 14. JeffW
    July 26th, 2008 at 2:12 am

    how about adding this for other webmail systems, mail.com, etc.

    [Reply]

  15. 15. ArtMama
    September 4th, 2008 at 11:55 pm

    These are the first directions on this topic that have actually WORKED for me! Have tried several, and the java link never worked. Very happy now…thanks!

    [Reply]

3 Trackbacks/Pings (Trackback URL)

  1. 1. foxiewire.com July 5th, 2008 at 1:42 pm
  2. 2. iPod, Web, How to, Internet, Computer, Free Software, Tips, Make Money Online with AhTim July 10th, 2008 at 11:03 am
  3. 3. o2webdev » Blog Archive » Set Gmail as your email client in Firefox July 18th, 2008 at 10:29 am

Leave a Reply




Comment:

Firefox 3

Links

Recent Entries

Recent Comments