Using multiple Gmail accounts with mailto: links in Firefox
For a while now, Google has allowed you to sign in to multiple Google accounts and switch back and forth between them quite easily. Firefox also allows you to use Gmail as the default application for mailto: links.
This is all fine and dandy, until you click a mailto: link and decide you don’t want to send that e-mail using your primary Gmail account. In my case, this happens when replying to posts on craigslist. I always assumed there wasn’t a “clean” solution, resigning myself to copying and pasting the e-mail and subject lines, or even at times clicking the mailto: link on my Android phone, which allows me to select any account on my phone to send the e-mail from.
Finally decided to do some research and found a solution on the mozillazine forums.
To summarize:
- Go to about:config in Firefox
- Set gecko.handlerService.allowRegisterFromDifferentHost = true
- Open the Web Developer scratchpad. (Firefox> Web Developer> Scratchpad or Tools>Web Developer > Scratchpad)
- In the scratchpad, type the following line of JavaScript:
navigator.registerProtocolHandler("mailto", "https://mail.google.com/mail/b/[email protected]/?extsrc=mailto&url=%s", "Description of your Gmail Account"); |
- Repeat the line as many times as necessary, once for each of your Gmail accounts.
- Once you have created all the necessary lines, go to Execute > Run.
- The “information bar” will pop up in your main Firefox window, asking you if you want to add your Gmail account as a handler for mailto: links. Accept once for each account.
- That’s it. Now when you click a mailto: link, you’ll be prompted which Gmail account to use.