PHP script for harvesting email from gmail (IMAP) mailbox