How do I connect to Gmail and determine which messages have attachments? I then want to download each attachment, printing out the Subject: and From: for each message as I process it.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hard one 🙂
Wowww! That was something. 😉 But try the same in Java, just for fun!
By the way, I tested that in a shell, so some errors likely remain.
Enjoy
EDIT:
Because mail-box names can change from one country to another, I recommend doing
m.list()and picking an item in it beforem.select('the mailbox name')to avoid this error: