If you’ve been using Thunderbird to manage your email account, or have simply used it to back up a hosted email account then you can connect Thunderbird to a Gmail account and upload all existing emails there. This is quite straightforward to do, but can take a lot of time if you have hundreds and thousands of emails to transfer.


1. Enable IMAP access in your Gmail account


Go to Account -> Settings  (use the top right icon to access this)

Gmail Account Settings



Go to the Forwarding and POP/IMAP Tab

Gmail POP Settings



Under IMAP access make sure you have checked ‘Enable IMAP access’



Save the changes

Gmail Save Changes



2. Enable Access for less secure apps (temporarily)

Under your gmail avatar icon at the top right you will find your general Google Account Settings

Google account settings



Go to the Sign-In & Security section on the left of the screen and find the ‘Apps with account access’ link

Google Sign In Security



Google Apps with Account Access



In the bottom section of that page enable ‘Allow less secure apps’

Google Allow Less Secure Apps



You will receive an email notification from Google warning you that this setting has been modified. We will be disabling this again once our email import has been completed.

Google Security Alert Email



Now you’re ready to configure Thunderbird to sync with your Gmail account.


3. Set up Gmail as an IMAP account in Thunderbird


Select Tools -> Account Settings



At the bottom of the screen you will see a dropdown list of Account Actions where you can click ‘Add Mail Account’

Thunderbird add Mail account



Type your name and gmail email address

Thunderbird add Gmail account

Click Continue

Thunderbird will now attempt to retrieve the configuration settings. If the values are correct then use Done to finish this step. Otherwise use the Manual Config button to edit the values until they are correct.

Thunderbird Gmail Config Settings



You now need to authenticate Thunderbird with Gmail



Thunderbird will now try and connect to your gmail account

Thunderbird Checking Password



It will take a few minutes to sync, but then you will see the list of Gmail folders appear in Thunderbird

Thunderbird Gmail Account

You can disable checking for emails as we’re only looking to import into the Gmail account. Do this by going to the Gmail account in Thunderbird and choosing the Server Settings section.

Thunderbird Gmail Server Settings



4. Import Email from Thunderbird to Gmail

Import folders


This is a simple drag and drop process in Thunderbird from your original email account to the gmail account.

In Thunderbird select a folder you want to import to Gmail

Thunderbird Select Folder to Upload

Drag and drop that folder into the Gmail account to upload the folder and messages to Gmail

If you look in your Gmail online account you will see a label has appeared for that folder and the messages are in it. The conversations will be nested like they usually are in Gmail.

Gmail Uploaded Folders



Repeat this for all folders you want to copy. Some folders will take a lot of time to upload into your Gmail account. You can see the status at the very bottom of the Thunderbird pane.

Thunderbird Upload



If you don’t want to upload an entire folder you can select specific emails and drag them into the Gmail folder where you want to store them.

Command and A will select all emails in a folder for copying. Note that the connection may time out if you are transferring a lot of emails in one go and you will need to repeat the transfer to make sure you get them all.


Import Inbox and Sent Mail

Don’t forget to copy over emails in your Inbox and Sent Items folders into the Gmail Inbox and Sent Mail folders. Select the emails you want to copy and then go to Message -> Copy To… or just right-click the selected messages and select Copy To

In this example I copied the Inbox items to a Gmail label called info@xxxxx.com to keep the archived emails separate to the current Gmail Inbox. You may need to copy these in batches as a large number of emails may not transfer successfully in one go.

Thunderbird Upload Inbox to Gmail



Thunderbird Copying Inbox


Here I am copying the Sent Items into the Gmail Sent Mail Folder

Thunderbird Copy to Gmail Sent Mail

Thunderbird Copying Sent Items



5. Final Steps


The last step is to disable access for less secure apps in your Gmail account again. Repeat the steps from the “Enable Access for less secure Apps” step above, only this time disable access.

Now you should have all your email available within your Gmail account.