We have two new open-source projects to help people import their existing email into Gmail using the Gmail API: mail-importer and import-mailbox-to-gmail.
Do you have an old Thunderbird mail archive that you downloaded from an old email account? 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? Then maybe mail-importer is for you! The project aims to make it easy for users to import mailbox files from their computer to Gmail. The project is in early development and only has command-line support right now.
Or maybe you are a Google Apps administrator trying to import all of your users’ old mbox files into Google Apps for Work? Then import-mailbox-to-gmail is probably what you’re looking for. It is a Python script that will do bulk imports of multiple mailboxes into multiple accounts in a domain. It's admin-managed, so your users won't have to individually import their archives. To migrate from other types of archives or mail servers to Google Apps, see the Help Center.
For developers, import-mailbox-to-gmail can be used as an example of how to perform domain-wide delegation for the Gmail API. mail-importer shows how to use batching and retries to efficiently query the Gmail API.
Interested? Want to contribute? Fork the projects on GitHub, send us pull requests, file issues and share your tricks on the wiki for each of the projects. See the CONTRIBUTING files for more details.
By Ian Flanigan, Software Engineer, Gmail and Liron Newman, Technical Solutions Engineer, Google for Work