polo2ro / imapbox

Dump imap inbox to a local folder in a regular backupable format: html, json and attachements
MIT License
223 stars 47 forks source link

Add support for handling Gmail accounts #41

Closed jakeprice-me closed 2 years ago

jakeprice-me commented 2 years ago

This PR adds support for Gmail accounts which fixes the issue described in #31

I've tested it with my Fastmail account and my wife's Gmail account, which has 34,000+ emails, and the script downloaded everything without issue as far as I can tell.

There may also be some debate on whether the "[Gmail].All Mail" folder should be excluded, but from the testing I've done, it appears to just end up duplicating emails, as it contains all the mail, so everything in the Inbox, Sent Mail and more.

Bit more info on "All Mail" here: here and [here](https://support.mozilla.org/en-US/kb/thunderbird-and-gmail#w_subscribing-to-or-unsubscribing-from-folders-labels.

polo2ro commented 2 years ago

Thanks!