How can I empty gmail inbox from bash or sh? Can it be done using gmail POP3 server pop.gmail.com:995 or imap? I found a way to read emails via atom but it seems that it does not work via POP3 so the emails stay in the inbox.
feedback
|
|
Connect to Gmail IMAP using any console IMAP client:
| |||
|
feedback
|
|
you can use poplib module of python to check the mail and delete it accordingly see this for details | |||
|
feedback
|
|
I guess you can do it quickly by logging in via the web. Click on the checkbox on the top of the list. This will select the first page mails. Now you will notice a link which will have a text which goes like "All xx conversations on this page are selected. Select all xxx conversations in Inbox" where xx is the number of conversations you see in the page and xxx is the number of total mails. Click on that link and then click on the bin icon (Delete). This will delete all your inbox. Follow the similar procedure for the outbox and drafts. Done! | |||||||
feedback
|