Re: Directing Email to a script

From: Date: Tue, 20 Feb 2001 00:28:58 +0000
Subject: Re: Directing Email to a script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40676@lists.php.net to get a copy of this message
I've done this using qmail which is installed on my ISP's server. I had to set up a qmail file named like this and dropped into my root: .qmail-allan Where allan is the email address that the emails are coming into (i.e allan@domain.com) This file must contain a pipe to the script in this form: |/home/yourdirectory/script.php And that's it the email is now sent to the script. To pick up the email being sent to the script you use something like the following: $fp = @fopen("php://stdin", "r"); //This removes the message from the stream while (!feof($fp)) { $incoming .= fgets($fp, 4096); } // end while fclose($fp); // closes stream At the end of this $incoming will contain the email How you parse the email is another can of worms. regards Allan Cybercandy Ltd ----- Original Message ----- From: <Website4S@aol.com> To: <php-general@lists.php.net> Sent: 19 February 2001 11:26 AM Subject: [PHP] Directing Email to a script > Hi, > > Im sure its possible but I cant find any info on it, anyone > know of any > source or tutorials etc about directing email to a PHP script. > > TIA > Ade > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#40676) next »