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
[EMAIL PROTECTED])

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: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 19 February 2001 11:26 AM
Subject: [PHP] Directing Email to a script


> Hi,
>
> I`m sure its possible but I can`t 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to