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.
You will have to enable IMAP access to your GMail account (Settings → Forwarding and POP/IMAP), and then use imaplib.IMAP4_SSL to access it.
imaplib.IMAP4_SSL
Use the raw text of every message as an argument to email.message_from_string in order to process any attachments.
email.message_from_string