0

I found out a better way to do this: Check Gmail IMAP via PHP for new mesages in a loop


I use Google to administer my e-mails and I run Nginx + PHP. If I want to check incoming mail to interact with each message subject (to trigger an action), as far as I know, I have only two options: 1) access Google via IMAP PHP / cron job or 2) forward the messages to my server where I can have a subdomain set to pipe the messages to a PHP script. Frankly, I'd preffer the first option because I have already all the IMAP functions tested and done. And if the second solution is really the best, I'd preffer to use Postfix. However, id like some light from somebody who has already browsed this unknown waters. Thank you.

Community
  • 1
  • 1
Roger
  • 8,286
  • 17
  • 59
  • 77

1 Answers1

0

Zend Framework has pretty good IMAP support. Check out Zend_Mail_Storage_Imap: http://framework.zend.com/manual/en/zend.mail.read.html

There are lots of other useful things in Zend_Mail. Remember, that you can use just the one class you need. You don't need to use the whole framework.

NullUserException
  • 83,810
  • 28
  • 209
  • 234
d-_-b
  • 6,555
  • 5
  • 40
  • 58
  • How can I use this product since all email is going to Apps? – Roger Feb 06 '11 at 08:19
  • Hehehehe, it looks like this is just more ZEND PROPAGANDA. Zend's people are active in this forum, aren't they? – Roger Feb 16 '11 at 10:13
  • @Roger, I have no affiliation with Zend. I am not Zend certified. I just happen to like the ease of use and well coded components of ZF. Are you Hindu? – d-_-b Feb 19 '11 at 01:06
  • Now for the explanation. You would use Zend_Mail_Storage_Imap to check your Google email account via IMAP and then "interact with each message subject (to trigger an action)". I don't understand why this is not obvious from my reply. Or maybe the question was not clear. If you want to be more specific, then maybe you can get a more specific answer. – d-_-b Feb 19 '11 at 01:09