Mail Importer for Gmail
Do you have an old Thunderbird mail archive that you POP3ed down from AOL?
Do you want to move those old messages to Gmail so that you can use the Gmail app on your phone and still have access to everything?
If so, maybe Mail Importer for Gmail is for you!
If you are trying to bulk import mbox format files to Google Apps for Work, you should probably look at import-mailbox-to-gmail.
DISCLAIMER: This is not an official Google product.
What does it do?
Mail Importer for Gmail will upload the contents of a Thunderbird mail archive to Gmail and do its best to preserve the read state, flagged state, and folders of the messages. As messages are uploaded verbatim, Gmail will have an exact copy, including all attachments and headers.
Mail Importer also makes sure to only upload messages that aren't already in Gmail. This makes it easy to re-run the import multiple times if something goes wrong.
How can I run it?
Currently, Mail Importer for Gmail is in early development. It is not user friendly in any way. If you are not a developer, you probably want to stay away.
Getting a Client Secret
Each developer needs a client secret to identify their version of Mail Importer to Google using OAuth2. To get a client secret, you have to create a project in the Google Developers Console, configure it correctly, then download the generated credentials. The result should be a JSON file named something like:
You need to copy this to
src/main/resources/client_secret.json in your Mail
Importer project. Never check in this file! It is your key and no one
Building Mail Importer
Mail Importer uses Maven. This means that it will download all of the necessary dependencies automatically when you build it like this:
mvn clean package assembly:single
This will produce a runnable
.jar file in
Running Mail Importer
Once Mail Importer is built, you can run it like:
java -jar ./target/mail-importer-1.0-SNAPSHOT-jar-with-dependencies.jar \ --mailbox DIRECTORY
DIRECTORY is the Thunderbird mailbox to open.
Note that the Thunderbird
Local Folders. It is this last level of directory that contains the actual
For example, if you had old CompuServe mail on a Mac, you might run Mail Importer like this:
java -jar ./target/mail-importer-1.0-SNAPSHOT-jar-with-dependencies.jar \ --mailbox /Users/me/Library/Thunderbird/my_profile/Mail/pop.csi.com
Can I help make Mail Importer better?
You bet! See the CONTRIBUTING.md file for more information.