- Visit https://support.google.com/accounts/answer/185833 for full guide.
- Select
Mailin App andOtherin Device
- Default it will delete all email which contains
Custom Stringin subject. Change it in line 5. - To delete all email from a specific sender, replace line 10 with
typ, data = box.search(None, 'from', '[email protected]') - To delete all unread email, replace line 10 with
typ, data = box.search(None, 'UnSeen') or set value of query toUnSeen`
Use python3.8.0 or older.
python3 delete_email.py