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.
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
.