Gmail: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
m (Mentioned changes needed to update it for TB 3)
Line 1: Line 1:
''These are Thunderbird instructions, but they also apply to the Mozilla Suite. The main difference is that for Thunderbird use Tools -> Account Settings, and for Seamonkey use Edit -> Mail & Newsgroup Account Settings.''
''These are Thunderbird instructions, but they also apply to the Mozilla Suite. The main difference is that for Thunderbird use Tools -> Account Settings, and for Seamonkey use Edit -> Mail & Newsgroup Account Settings. They haven't been updated for Thunderbird 3.0 yet which uses a different account wizard, and changes the name of connection security settings''


Gmail supports webmail, POP, and [[IMAP]] accounts. Gmail also provides an SMTP server for sending messages. To add an account in Thunderbird, you need to add either a POP or IMAP account and then enable it in Gmail settings using a browser. Prior to version 3 of Thunderbird, you also need to configure the account to use the Gmail SMTP server.
Gmail supports webmail, POP, and [[IMAP]] accounts. Gmail also provides an SMTP server for sending messages. To add an account in Thunderbird, you need to add either a POP or IMAP account and then enable it in Gmail settings using a browser. Prior to version 3 of Thunderbird, you also need to configure the account to use the Gmail SMTP server.

Revision as of 06:20, 1 November 2010

These are Thunderbird instructions, but they also apply to the Mozilla Suite. The main difference is that for Thunderbird use Tools -> Account Settings, and for Seamonkey use Edit -> Mail & Newsgroup Account Settings. They haven't been updated for Thunderbird 3.0 yet which uses a different account wizard, and changes the name of connection security settings

Gmail supports webmail, POP, and IMAP accounts. Gmail also provides an SMTP server for sending messages. To add an account in Thunderbird, you need to add either a POP or IMAP account and then enable it in Gmail settings using a browser. Prior to version 3 of Thunderbird, you also need to configure the account to use the Gmail SMTP server.

Gmail is rebranded as Google Mail in Germany, Austria and the United Kingdom.

Add a POP account

In Thunderbird 3, see Gmail's support pages for detailed instructions.

The following instructions are for older Thunderbird versions:

If you don't have a Gmail POP account:

  • Open Thunderbird, go to "Tools -> Account Settings", click the "Add Account" button, select "Gmail" and click "Next".
  • Enter your name in the "Your Name:" field, and enter your entire Gmail address (yourname@gmail.com) in the "Email Address:" field. Click the "Next" button.
  • Press the "Finish" button.

If you already have a Gmail POP account and want to add another:

  • Open Thunderbird, go to "Tools -> Account Settings", click the "Add Account" button, select "Email Account" and click "Next".
  • Enter your name in the "Your Name:" field, and enter your entire Gmail address (yourname@gmail.com) in the "Email Address:" field. Click the "Next" button.
  • Select "POP" as the account type and enter pop.gmail.com in the "Incoming Server" field. If you don't want your Gmail messages to be stored in Local Folders, unselect "Use Global Inbox (Store Mail in Local Folders)". If it can use your default SMTP server it will tell you what SMTP server it is using. If it doesn't or you want to use Gmail's SMTP server enter smtp.gmail.com in "Outgoing Server". Click the "Next" button.
  • Enter your entire Gmail address (yourname@gmail.com) in both the "Incoming User Name:" field and the "Outgoing User Name:" field. Click the "Next" button.
  • Enter a name (such as "Gmail") for your Gmail account in the "Account Name:" field, click the "Next" button and then the "Finish" button. There will now be a new account showing in "Account Settings" called "Gmail" or whatever you named it.
  • Select Server Settings from the folder list below your new account.
  • Change "Port" to 995.
  • Find the Security Settings section and select SSL.
  • Check the checkbox for "Check for new messages at startup" and "Automatically download new messages".
  • Continue below


Add an IMAP account

Gmail added support for IMAP accounts in 2007. You can use either POP or IMAP, but you normally don't want to use both. If you already have a Gmail POP account with the same username, save to Local Folders any downloaded messages you have and then delete the POP account using Tools -> Account Settings -> Remove Account. You'll still be able to access any messages that you had stored on Gmail's mail server, you'll just be using IMAP instead of POP.

In Thunderbird 3:

  • Open Thunderbird, go to Tools -> Account Settings, click the "Account Actions" button and select "Add Mail Account" and fill in the required information.
  • Go to Tools -> Account Settings and select Server Settings from the navigation panel below your new account.
  • In "When I delete a message", choose "Just mark it as deleted" to avoid problems with the way Gmail handles possible multiple copies of the same message in different folders. (Gmail deletes all the others too unless you have the setting "Just mark it as deleted".
  • Check the checkbox for "Check for new messages at startup". Don't check the one for "Check for new messages every X minutes". Gmail supports the IMAP IDLE command. This means the IMAP server automatically notifies the email client when there is new mail (if you're still logged in), so there is no need to poll for new mail.
  • Before doing the next step, follow the directions for Thunderbird at Gmail's support site, otherwise drafts will go into a hidden Thunderbird's Drafts folder.
  • Select the "Advanced" button.
  • Enter "[Gmail]" (without the quotes) in "IMAP server directory". This works around a bug in how it displays the folders. Capitalise only the first letter; it won't work otherwise. Note: if you are using GoogleMail, enter "[Google Mail]" instead.
  • Press the "OK" button.
  • Continue below

The following instructions are for older Thunderbird versions:

The new account wizard lists Gmail as one of the choices. However, that was implemented before Gmail added IMAP support so it only supports POP accounts. There is a bug report requesting they add support for IMAP. In the interim you could either try the Gmail IMAP Account Setup addon or use the following instructions, which use the generic email support in the new accounts wizard.

  • Open Thunderbird, go to "Tools -> Account Settings", click the "Add Account" button, select "Email Account" and click "Next".
  • Enter your name in the "Your Name:" field, and enter your entire Gmail address (yourname@gmail.com) in the "Email Address:" field. Click the "Next" button.
  • Select "IMAP" as the account type and enter imap.gmail.com in the "Incoming Server" field. Click the "Next" button. If you already have a account and it can use your default SMTP server it will tell you what SMTP server it is using. Otherwise enter smtp.gmail.com in "Outgoing Server" and click "Next".
  • Enter your entire Gmail address (yourname@gmail.com) in both the "Incoming User Name:" field and the "Outgoing User Name:" field. Click the "Next" button.
  • Enter a name (such as "Gmail") for your Gmail account in the "Account Name:" field, click the "Next" button and then the "Finish" button. There will now be a new account in "Account Settings" called "Gmail" or whatever you named it.
  • Select Server Settings from the navigation panel below your new account.
  • Change "Port" to 993.
  • Find the Security Settings section and select SSL.
  • In "When I delete a message", choose "Just mark it as deleted" to avoid problems with the way Gmail handles possible multiple copies of the same message in different folders. (Gmail deletes all the others too unless you have the setting "Just mark it as deleted".
  • Check the checkbox for "Check for new messages at startup". Don't check the one for "Check for new messages every X minutes". Gmail supports the IMAP IDLE command. This means the IMAP server automatically notifies the email client when there is new mail (if you're still logged in), so there is no need to poll for new mail.
  • Before doing the next step, follow the directions for Thunderbird at Gmail's support site, otherwise drafts will go into a hidden Thunderbird's Drafts folder.
  • Select the "Advanced" button.
  • Enter "[Gmail]" (without the quotes) in "IMAP server directory". This works around a bug in how it displays the folders. Capitalise only the first letter; it won't work otherwise. Note: if you are using GoogleMail, enter "[Google Mail]" instead.
  • Press the "OK" button.
  • Continue below

Enable the account

  • Log into your Gmail account using a browser.
  • If you're using a POP account, click on "Settings -> Forwarding and POP/IMAP -> POP Download:" and choose either "Enable POP for all mail (even mail that's already been downloaded)" or "Enable POP only for mail that arrives from now on". (Either option you choose that fits your needs will work here.)
  • If you're using an IMAP account, click on "Settings -> Forwarding and POP/IMAP ->Enable IMAP"
  • You might want to also click on "Settings-> General" and select "always use https" in the browser connection section at the bottom. That has no effect on Thunderbird but is a good way to help avoid cross-site scripting attacks when logged into webmail using a browser.
  • Click the "Save Changes" button.

Add an SMTP server

You can skip this step if you're using the default SMTP server.

  • Still in "Account Settings", click on "Server Settings" (under "Gmail" in the left panel) and select the checkbox for "Use Secure Connection (SSL)". Optionally, also select the checkbox for "Check for new messages every 10 minutes". Don't select anything else.
  • Next, click on "Outgoing Server (SMTP)" in the left panel (you may need to scroll down), click the "Advanced" button and click the "Add" button.
  • In the "Server Name" field write smtp.gmail.com. The "Use name and password" box must be selected. In the "User Name" field enter your entire Gmail address (yourname@gmail.com). Under "Use Secure Connection" select TLS. After selecting TLS, the port number will automatically change from 25 to 587. This is correct! Now click "OK" and "OK" again.
  • Go back to "Server Settings" under "Gmail", click the "Advanced" button and then the "SMTP" tab. In the "Server" field drop-down select the last one. Normally it will be smtp.gmail.com:587. Click the "POP" tab and select "Inbox for this server's account". Click the "OK" button. Close Thunderbird and restart the application.

Send a test message

  • Try to send and receive e-mail messages in Thunderbird using the Gmail account. Thunderbird will ask for your Gmail password twice, once when you send, then again when you receive e-mail. You should enter the password correctly both times when prompted. If desired, select "Use Password Manager to remember this password" so that it won't ask for your password the next time you send and receive e-mail. To protect your privacy, you can instead leave the "Use Password Manager to remember this password" un-checked if someone other than yourself may have access to your e-mail client.
  • You're done.

Disposable addresses

Gmail supports plus-addressing, a useful way to create a disposable email address. Let's say your email address is JohnSmith@gmail.com and you need to give the xyzzy website an email address. If you give them JohnSmith+xyzzy@gmail.com, it will still be delivered to your inbox, despite the To: header having an extra "+xyzzy". If somebody starts sending spam to that email address, you could create a message filter that tests for xyzzy in the To: header and automatically delete (or move to the Junk mail folder) those messages when checking for new mail. Some email systems violate RFC 2822 and won't send a message using plus addressing, but it is normally not a problem.

Mail fetcher

Gmail supports a way to periodically fetch email from up to five POP accounts and merge them into your inbox. The POP accounts could be provided by Gmail or another email provider. It works with Thunderbird, but you have to configure mail fetcherusing Gmail webmail.

Troubleshooting and Gmail quirks

  • Gmail treats POP and IMAP messages messages individually and not as a threaded conversation.

POP3

  • If you're using the same Gmail account with multiple clients you need to enable recent mode in order to let each client access all of the messages in that account. You can do that by replacing username@gmail.com with recent:username@gmail.com as the username in Tools -> Account Settings -> Server Settings.
  • This thread has a screen shot of working settings for Gmails POP and SMTP servers.

IMAP

Subscriptions

Subscriptions control whether an IMAP folder is visible in the folder pane (and any lists of folders). If it is cluttered with folders you don't normally use, you might want to hide some by unsubscribing them. This will however prevent you from being notified if you get new mail that is stored in them.

The All Mail folder contains a copy of all messages for the Gmail account. This is an artifact of how Gmail implemented labels, not a Thunderbird quirk. Thunderbird 3.x enables "message synchronization" by default, which keeps a local copy of all IMAP folders on your hard disk. If All Mail is subscribed, this doubles the amount of disk space used by your Gmail account and may cause some problems. It is recommended you unsubscribe from the All Mail folder.

You can subscribe or unsubscribe a folder by:

  1. Right click on the Inbox.
  2. Select Subscribe.
  3. Click on the '>' next to the Inbox to expand the folder list.
  4. Check any folders you want to make visible (subscribe), uncheck any you want to hide (unsubscribe).
  5. Press the OK button.

You can also use the Subscribe and Unsubscribe buttons in that menu.

To actually free the disk space, you have to navigate to the imapmail directory of your Thunderbird profile, then to the Gmail account and [Gmail].sbd, and delete the "All Mail" file and All Mail.msf.

Compatibility

The IMAP support is buggy/incomplete, though it's improved a lot since it was first available.

  • \Answered and \Recent flags on messages are not supported.
  • Only the From, CC, BCC, To, and Subject headers can be searched. All searches are assumed to be words. Searching for messages based on the Subject fails if it contains an underscore, but the search incorrectly finds messages whose body contains an underscore. Subject searches also fail if the search string contains a dot or an open or closed parenthesis as in the correct subject of messages. For example, a search of "2006.01.15" fails to find any message containing "2006.01.15" in the subject field (an exact search such as "2006.01.15 hello" also fails to find a message exactly titled "2006.01.15 hello"). This bug has been raised to the Gmail team and they are aware of it.

Labels

The IMAP folders correspond to the labels in Gmail's webmail. IMAP folder hierarchy is represented by "/" in Gmail's label. e.g. IMAP subfolder XYZ under ABC is mapped to label of ABC/XYZ(maximum length=40 bytes). However, mapping of IMAP folder to Gmail's folder or label at Web interface is special on some special folders.

  • IMAP folder of [Gmail]/All Mail, [Gmail]/Drafts, [Gmail]/Sent Mail, [Gmail]/Spam, [Gmail]/Starred, [Gmail]/Trash
    => Gmail's folder of All Mail, Drafts, Sent mail, Spam, Starred, Trash.
  • Other IMAP folders such as XYZ under [Gmail]
    => Gmail's label of [Gmail]/XYZ.
  • Root level IMAP folder of Drafts, Sent, Trash
    => Gmail's label of [Imap]/Drafts, [Imap]/Sent, [Imap]/Trash.

If you look at the All Mail folder([Gmail]/All Mail of IMAP) using Gmails webmail it will label any IMAP messages with the name of the folder. If you delete a message in Thunderbird it simply removes that folder's label from the message. Compacting the folder doesn't remove the message from the All Mail folder([Gmail]/All Mail of IMAP). You need to move it to the Trash or Spam folder([Gmail]/All Mail or [Gmail]/Spam of IMAP) to delete the message from all folders. It's not clear yet if this is also true for Message aging. Moving back of mail in [Gmail]/All Mail of IMAP to any IMAP mail folder(except [Gmail]/Spam) restores all Gmail's label.

A copy of a message is stored for each label. That means if you assign two labels to a message and star it using Gmails webmail it has a copy in two folders named after the label, the All Mail folder, and the Starred folder. If you copy a message to multiple remote folders (using Thunderbird) it will be marked with the corresponding labels when viewed using Gmail webmail.

If you move a message into the Spam folder, it is treated the same as if you had reported it in Gmail webmail using 'Report Spam'. See How do actions sync in IMAP? on Gmails web site for more information on how it maps things.

Gmail recommends that you do not use [Gmail]/Trash as your Trash folder since Gmail only keeps a single copy of a message with multiple labels. If you delete a message that way you're also telling it to delete the same message from any other folder (label) that has that message. [1] [2] Gmail recommends not making Thunderbird move deleted mail into any folder and instead choosing "Just mark it as deleted" "When I delete a message" in Account Settings -> Server Settings.

Problems

Gmail imposes an unspecified limit on how many messages you can upload during a short amount of time. If you exceed it, you get temporarily locked out of the account. It is not clear yet whether this is actually a bandwidth limit.

A similar limit has been reported in the forums for downloading messages. This was primarily observed when offline folders are enabled. In those cases, a large amount of messages was downloaded on initial synchronization or when reindexing an IMAP folder.

If large messages or attachments are truncated, set mail.server.default.fetch_by_chunks = false to work around a size bug in Gmail.

Gmail has problems with non-ASCII characters in headers. This might occur if they're used in a recipient's email address, folder names or tags. To work around the bugs in Gmail header fields, go to "Tools -> Options -> Advanced -> General -> Config Editor (button)", right-click anywhere in the list of preferences, select New, select Boolean, copy-paste mail.imap.use_envelope_cmd, and set it to true. [3] [4]

The Gmail list of known IMAP issues mentions that the "All Mail" folder can have well over 100,000 messages and that some email clients may crash if they try to process a folder with that many messages. Thunderbird doesn't have any known limit on the maximum number of messages in a folder, but most of the attention has been on the maximum size of a folder.

This forum thread discusses some more quirks.

Note
Please check bugs listed in the dependency tree for bug 402793(meta bug) with "Show Resolved", before opening a bug relevant to Gmail IMAP at bugzilla.mozilla.org.

SMTP (Sending messages)

  • If you send a message from your Gmail account to the same Gmail account in Thunderbird, that message will not be downloaded into Thunderbird. The message will, however, appear in your Gmail Inbox if you log into your account using the Gmail web interface. This is not a bug in Thunderbird; it is a quirk in the way Gmail implements POP. If you use IMAP, an e-mail sent to yourself shows up in Inbox, [Gmail]All Mail, and [Gmail]/Sent Mail folders.
  • Gmail's SMTP server ignores whatever "From:" address you might specify using multiple identity support by default and uses your Gmail authenticated address instead. You have to register any other address using Gmail's web interface at Setting -> Accounts -> "Add another email address" to enable it as "From:" address. Your authenticated Gmail address is still added as a secondary "Sender:" header.
  • If Thunderbird refuses to use the correct outgoing (SMTP) server, see the "Troubleshooting" section in this article.
  • The Gmail SMTP server now officially supports both STARTTLS (port 587) and SSL/TLS (port 465). Note: Thunderbird 3.0 renamed TLS to STARTTLS and SSL to SSL/TLS.
  • Gmail scans attachments for viruses and blocks any that it thinks contains executables. This includes .zip files. You can work around this by changing the filenames to use file extensions it doesn't recognize. However, since that violates their policies you could potentially lose your Gmail account. A better solution might be to use a free file hosting site such as RapidShare, MegaUpload or YouSendit and send a link to the file instead.

See also

External links