Using multiple GMail accounts with Thunderbird

Updated directions below; including a dialog-based set of instructions

I’ve been hassled for a while with what I perceived as a problem with GMail that I was finally able to solve yesterday.

I have 2 GMail accounts, and I subscribe to various mailing lists (especially Gooogle Groups) with different accounts depending on the purpose of the group, and I’ve consistently had an issue wherein I would use Mozilla Thunderbird to post to a group with one of my GMail accounts and the message would be rejected because the email address sending it didn’t belong to that group. I also noticed that I’d send personal email from the second account and when the recipient replied I’d note that they’d received the email from the other address. I figured perhaps this was a limitation of GMail’s support for SMTP access and had resigned myself to only using the second account in the browser when composing. Of course I also figured that the problem could really be with my understanding of mail architecture, which is growing, but still fairly small.

I had a little time this weekend while I was waiting for the Cheney and Mills show at the Opera House (my other job) and I poked around in Thunderbird, figured out the problem, and fixed it. Here are the details.

The problem is this; Thunderbird was using the same SMTP account for both of the GMail accounts and was sending as the user associated with that account. I don’t exactly know why this was the case or why it mattered, but it probably had something to do with the way I set the accounts up. Interesting to note is that I also have 3 separate mail accounts at my hosting company on the same SMTP account in Thunderbird, all of which send as the proper user.

The fix for the problem was to create an additional SMTP account for the additional GMail account and to set up the GMail account to use the second SMTP account. To do this, I used a very handy Thunderbird extension called AboutConfig, which exposes similar settings in Thunderbird to those that you can see in Firefox if you type “about:config” in the address bar. I didn’t see a way to configure these settings using the account management dialog in Thunderbird.

First, I copied the SMTP settings for my GMail account:

  • mail.smtpserver.smtpx.auth_method
  • mail.smtpserver.smtpx.hostname
  • mail.smtpserver.smtpx.port
  • mail.smtpserver.smtpx.try_ssl
  • mail.smtpserver.smtpx.username

where “x” is the number of the existing account. I had to pick the next number in the SMTP account number sequence to create new settings; otherwise I’d simply be overwriting the ones that already exist. I also needed to change the username to the username of my second account. Once that’s done I needed to point the second GMail account to the new SMTP account to make sure it was using that account using the mail.identity.idx.smtpServer setting for the account in question.

With that done, the second GMail account started sending mail as itself and not as the first account. WooHoo!

UPDATE: I forgot to mention one step in my initial directions, which is that you have to add the new SMTP server to the mail.smtpservers entry in about:config. Without doing so, Thunderbird doesn’t view that as a valid SMTP server choice and won’t send mail using the new SMTP server settings even if you have the identity configured to use SMTP server 3. Before modifications, my setting was “smtp2,smtp1″. When I added “smtp3″ to that list, Thunderbird recognized and used the new settings.

Alternatively, you could use the built-in Thunderbird tools to acheive the same effect:

  1. Go to the “Tools” menu and select “Account Settings …”
  2. Scroll to the bottom of the left-hand pane and select “Outgoing Server (SMTP). Click “Advanced…”"
  3. Click “Add…”
  4. Enter you account information, copying values from the existing GMail account (or you can copy the settings from the image below). Enter your second GMail account name.

This may actually be easier than editing the about:config settings, and Thunderbird automatically adds the new server to your SMTP server list.

  • Rich

    I got a new ISP and sent an invitation to myself to get another gmail
    account. (I want both gmail accounts: personal & bus.) Proceeded,
    established new account. Sent message to/from new account. Then
    couldn’t access old account. Finally, signed in to old account. Now
    can access old account only. Sign-in pre-prompts with old account name
    and will not allow new account name. I unchecked ‘remember this
    password’ hoping to avoid setting a cookie for either account… but no
    luck. I am now locked out of new account.

    I shouldn’t have to manually manipulate cookies or delete them to do
    this. Why not allow no pre-prompt (=my manual entry, or =select which
    account with pre-prompt) of account name so that I can choose which
    account I wish to access ? Why not build a cookie or cookies that
    supports multiple accounts ?

    How do you accomplish access to multiple gmail accounts ?

    Another, somewhat related topic… why not facilitate sorting for Inbox
    1, Inbox 2, Send 1, Send 2 (e.g. custom defined folders, sub-folders)
    to operate two accounts from one boilerplate GUI ? I’m quite
    satisfied with Mozilla Thunderbird doing exactly this. Why not gmail ?

    Facilitating multiple gmail accounts from one opening gmail page would
    be great. Working with either from that page would be great.

    Thanks

  • http://kinrowan.net/ cori

    Actually Rich, that’s one of the reasons I started using Thunderbird.

    GMail does specifically allow you to use only one account in the bowser, and the only way to use more than one is to sign out of one and sign in to the other. I do this by never checking the “remember” checkbox and manually viewing each account in turn, but only do that when not at my main machine – otherwise I use Thunderbird accross the board.

    I agree that an aggregate view of multiple GMail accounts would be useful, but I had originally thought that there was something in the GMail terms of service that said you could only have one account per person. When I researched it for this post I couldn’t find that language, but it seems clear that Google wants to encourage one account each. This would be a nice place for some kind of Google API hack to fill in the functionality hole – like a greasemonkey script, or something like Frappr.

  • Chris

    This is so $$$!!! You are the shit! Thanks.

  • Rohit

    I was having exactly the same problem, and this blog entry helped me solved it. Thanks!

  • Kabir

    I have been having a peculiar problem. I was able to configure gmail on outlook without a glitch but somehow i am having a lot of nagging problems with thunderbird. for some reason, its taking a lot of time for the mails to load and only about 1/10 of the mails are actually being recognized in thunderbird to be downloaded. This is despite having followed the configuration instructions to the T as given by Gmail

    Would request one of you guys to tell me whether its a conncetivity problem or something missing in my settings of thunderbird.

    Thanks!

  • http://www.spsvswimming.org Aaron

    This is a great post! It’s so easy to do from about:config, it makes you wonder why this functionality isn’t easier to access for non-advanced users.

    Thanks!

  • http://www.spsvswimming.org Aaron

    After some searching, apparently you can set different smtp servers without using about:config. Go to Tools—>Account Settings. Click the name of the account you want to edit (not any of the subheadings) and the last setting will read “Outgoing Server (SMTP)”. There will be a dropdown menu next to it that allows you to change servers!!

  • http://kinrowan.net/ cori

    Hey Aaron, Chris, Rohit;

    Thanks for the compliments – this post is one of my top hit-getters.

    Yes, I discovered that after having done the about:config rigamarole; in fact that solution is listed at the very end of my post.

    Kabir;
    Afraid I can’t help you with what you’re experiencing – I’m far from a Thunderbird expert….

  • Mik

    I also use SMTPselect for the same reasons. It's a thunderbird addon:
    https://addons.mozilla.org/nl/thunderbird/addon