Hi Brendan,

If the email is being received on your own server then there is an alternative to polling. You can have your email server pass the incoming messages to a php script for you.

For me (using postfix/procmail) I create a .forward file in the folder of the user and add something like:

"|IFS=' '&&  exec /path/to/my/mail/handler/script.php || exit 75 #www-data"

And all incoming email for that user gets passed to script.php

- Mike


On 26/10/2010 11:57, Brendan Brink wrote:
Hi there,

Wanting to accomplish the following:

1. Setup a special email address at my domain.
2. Using PHP, poll the email address inbox for unread emails every 5
minutes or so (using CRON job)
3. If there is an email extract the attachment on the email and save
as a file on the server.
4. Mark the email as read.

Anyone had any experience or has a good tutorial on how to do this correctly?

Cheers
Brendan.


--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to