PHP + email

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Is it possible to have a PHP script receive an email (CSV text). The  
problem is this, I want a server to send me an email, and then I want to  
be able to have a PHP script 'listening' for email and then processing  
the data in the email.

Is it possible to have a PHP script 'listening' or responding to an  
'email received' event, so that it can process the data ?


Re: PHP + email

Quoted text here. Click to load it

The closest arrangement I know of that does this:

Run a SMTP server locally such as sendmail or exim that supports
".forward" files.

Install a ".forward" file that pipes the email into a
STANDALONE (command-line) php script (no web server involved).

The PHP script gets invoked with the email on stdin when an email
arrives.  It is the responsibility of the script to skip over or
deal with the headers, and to filter out Viagra ads and bank phishing
spoofs that are not in the proper format for the data, and not to
open up security holes.  The script also has to deal with the
possibility that it might be invoked multiple times concurrently
if multiple emails arrive at the same time (so use database locking,

                    Gordon L. Burditt

Re: PHP + email

E.T. Grey wrote:
Quoted text here. Click to load it
Yes, you can use this extension:


Carl Vondrick

Site Timeline