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.
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.
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.
The link doesn’t work right now, can you check to see if this works?
Sorry about that. I’ve corrected it and is working now.
Set Gmail as your email client in Firefox – Mozilla Links…
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…
The javascript snippet is truncated. It currently reads as follows:
javascript:navigator.registerProtocolHandler(
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.
Exec-
Thanks for the info posted 7/5/2008 1:51pm (Gmail as default e-mail client). Very helpful! I had googled a BUNCH of stuff about this problem with no luck. Your info did the trick. Awesome.
Thanks again,
Mike
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: “0x8057001e (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
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.
Yep, that was it. No idea how that setting got that way but it worked like a charm now! Thanks, Percy!
Both about:config settings confirmed, the javascript still DOES NOT WORK – just opens a blank window.
Nevermind, it is working…
I was clicking from the lifehacker article, which copied your previously broken javascript.
Works now, thanks! You might as well make it link to the https:// version of gmail instead of http, though.
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
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. :/
Hotmail is much, much, mucho better!
Set Gmail as Default Email Client in Firefox…
If you’re new here, you may want to subscribe to my RSS feed. Remember to Digg it or Stumble it, if you enjoyed this post! :) I believe most of blogger here own a Gmail account. You might using email client to access Gmail with IMAP. How about if we …
some kind of mixed up with links? i’m visiting this page at –> http://mozillalinks.org/wp/2008/07/seamonkey-1110-update-available-now/
Ditto as “user” (comment 12) title and address are mismatched.
[...] for gecko.handlerService.allowRegisterFromDifferentHost and double click it to set it to [...]
how about adding this for other webmail systems, mail.com, etc.
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!
Is there a way to make Firefox open up the Gmail Compose window in a new tab or window? Right now it navigates away from the current page
I did all the steps, but when I click an email link from any random webpage, it DOES open a new gmail compose window, but leaves the to address blank…..any advise? Also is there a way to have the links open the compose gmail in a new popup window?
Thanks!
Would also like to know how to open mailto link in a new tab
Any advice? I followed the directions, I have no errors in the error console, followed both pieces of advice for about:config and it still doesn’t appear as a mailto option in my applications. The default Mail client for windows opens instead.
mozilla links





ShareThis
The javascript link to register it appears to be bad!
Reply