Hi,

On Tue, Oct 26, 2010 at 11:57 AM, Brendan Brink
<[email protected]> 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?

yes, have done this using the php_imap extension. Its very easy, just
build the code that you've outlined above and use the imap functions
to pick apart the parts of the email. If you're doing this against an
Exchange server it will be v e r y slow, so you better have mechanism
in place to handle when your cron job worked for more than 5 minutes.

HTH,

Kind Regards,

Jochen Daum

P.S.: Do you know anyone who wants to rent a desk in our Mt Eden
office? http://ow.ly/2Vs5i - no term commitment - fully serviced

Chief Automation Officer
Automatem Ltd

Phone: 09 630 3425
Mobile: 021 567 853
Email: [email protected]
Skype: jochendaum
Website: www.automatem.co.nz
http://twitter.com/automatem
http://nz.linkedin.com/in/automatem
http://www.xing.com/go/invite/3425509.181107
http://www.aucklandbusinessnetworking.co.nz


>
> 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]
>

-- 
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