Skip to content

Commit 6c7f4a4

Browse files
authored
Merge pull request #41 from jakeprice-dev/add-initial-gmail-support
Add support for handling Gmail accounts
2 parents 72bb744 + 2e18ec6 commit 6c7f4a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

imapbox.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ def main():
100100
folders = []
101101
for folder_entry in get_folder_fist(account):
102102
folders.append(folder_entry.decode().replace("/",".").split(' "." ')[1])
103+
# Remove Gmail parent folder from array otherwise the script fails:
104+
if '"[Gmail]"' in folders: folders.remove('"[Gmail]"')
105+
# Remove Gmail "All Mail" folder which just duplicates emails:
106+
if '"[Gmail].All Mail"' in folders: folders.remove('"[Gmail].All Mail"')
103107
else:
104108
folders = str.split(account['remote_folder'], ',')
105109
for folder_entry in folders:

0 commit comments

Comments
 (0)