Re: Mail responders
| From: | Miguel Cruz | Date: | Fri, 26 Apr 2002 17:09:07 +0000 |
| Subject: | Re: Mail responders | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94757@lists.php.net to get a copy of this message | ||
1) Make sure you have built the CGI versions of PHP.
2) Create a PHP script file that begings with a bangpath invocation of the
PHP CGI binary. So, if your standalone PHP were located in
/usr/local/bin/php, your PHP file would start with:
#!/usr/local/bin/php -q
3) In your script, use fopen, etc., to read from "php://stdin". The
incoming message will be there.
4) Do anything you like with the data. Store it in databases, create a
reply and mail() it out, etc.
5) You'll have to convince sendmail to deliver mail for one or more
addresses to your PHP script file. With qmail it's a matter of creating a
.qmail file with |/path/name but I wouldn't know how to do that particular
thing with sendmail as I never use it.
Good luck!
miguel
On Fri, 26 Apr 2002, JSheble wrote:
> How would you set this up via PHP? I've wanted to do this, but I always
> thought it was something specific to SendMail, and in a hosted environment,
> mucking about with SendMail generally isn't allowed...
>
> I'd like to send an email to something like admin@domain.com but have a
> PHP script get the mail and operate on it...
>
> At 11:56 AM 4/26/2002 -0500, you wrote:
> >On Fri, 26 Apr 2002, Dennis Gearon wrote:
> > > All these lists that have addresses to subscribe, unsubscribe, etc, how
> > > do they work? Are they using a cron job to poll the mail inbox through
> > > sendmail? Does all mail not to a specific address at the site go to a
> > > 'catchall' address, which is then polled?
> >
> >Usually the mail is delivered directly to a program rather than to a
> >mailbox. The program receives the incoming message as input and handles it
> >as it pleases.
> >
> >miguel
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>