Gmail-exporter is a command line utility for exporting a local copy of email messages and related attachments from your Gmail account.
-
Export email messages to a spreadsheet
-
Optionally export related attachments and put refs into the spreadsheet
-
Optionally export messages as EML and put refs into the spreadsheet
-
Exported messages filtered by label
-
Optional progress status for long tasks
Gmail-exporter's use of information received from Google APIs will adhere to Google API Services User Data Policy, including the Limited Use requirements.
Invoke the gmail-exporter
executable passing appropriate options.
This paragraph shows some usage examples.
Use ./gmail-exporter help
to get the full list of available options.
Messages are downloaded in blocks (pages): set the size of each block to max 50 messages
gmail-exporter --page-size 50 TRASH
Read at max 200 pages of messages
gmail-exporter --pages-limit 200 TRASH
Limit the transfer of messages at 1 per second
gmail-exporter --messages-per-sec 1 TRASH
Limit the download of attachments at 5 per second
gmail-exporter --attachments-per-sec 5 TRASH
When the application launches, it requests that the user grant access to data in the relevant Google account.
If the user consents, the application requests and receives a temporary token to access Gmail data. All the exchanged data is just kept within the user local system.
The temporary token is long-lived and saved into your local folder (by default within file token.json).
{
"access_token": "...",
"token_type": "Bearer",
"refresh_token": "...",
"expiry": "2022-07-17T13:30:07.560873398+02:00"
}
Add a tag with proper message and push it
git tag v0.0.1 -m "First public release for wider testing."
git push origin v0.0.1
Looking for other tools to backup your email messages? (and more)
Here are a few alternatives that are worthy of consideration:
Copyright © 2022-present Davide Cavestro. Use of this software is granted under the terms of the MIT License.
See the LICENSE for the full license text.