tags:

views:

74

answers:

2

I would like to write a script that can receive e-mail and then do something depending on instructions in that e-mail, but I have no idea where to start with this. Is this possible with PHP?

+3  A: 

There's an old (but good) email on evolt about piping incoming emails to a php script.

http://www.evolt.org/incoming_mail_and_php

If you don't have terminal access, you could instead use the imap/pop functions in php to read a mailbox.

adam
This is exactly what I'm looking for! Thanks!
DKinzer
A: 

No. Only a mail server can read email. However, you can have the mail server pipe the output to a PHP CLI script.

George Edison
PHP can be setup to act as a mail server.
Jordan S. Jones
The -1 wasn't me, but I think you are taking the question a little too literally. You're not a mail server, but you get email too.
adam
I edited it. But PHP is not a mail server.
George Edison
But it can be, when set to listen on a port accepting mail.
adam
True - but then any (and I mean just about any) language could be used for a mail server. And I don't think that's what @DKinzer wanted.
George Edison