I have been trying to find information on how to retrieve attachments from a gmail account in either python or PHP, I’m hoping that someone here can be of some help, thanks.
Related:
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.
You will have to enable IMAP access to your GMail account (Settings → Forwarding and POP/IMAP), and then use
imaplib.IMAP4_SSLto access it.Use the raw text of every message as an argument to
email.message_from_stringin order to process any attachments.