Python: delete emails with imaplib
Before running the script, you need to turn on "Allow less secure apps".
- Login your mail account
- For gmail, you can access this https://myaccount.google.com/security
- Make sure "Allow less secure apps" is ON
If It is OFF, you will get an error like this while running the script
Below is the script :)
- Login your mail account
- For gmail, you can access this https://myaccount.google.com/security
- Make sure "Allow less secure apps" is ON
If It is OFF, you will get an error like this while running the script
Below is the script :)