Re: Getting PHP to read the mail!
| From: | Richard Lynch | Date: | Thu, 11 Jul 2002 10:12:00 +0000 |
| Subject: | Re: Getting PHP to read the mail! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107086@lists.php.net to get a copy of this message | ||
>I'm writting an autoresponder system in PHP. and I'm using wget in my cron
>jobs to process it. Is there a way that I can process incoming mail in PHP
>and call the PHP using a similar method?
>
>Basically I want to go through all the email messages checking if they are
>to autoresponder@blah.com and if they are I would like to processes the mail
>body and subject line.
>
>I'm sure there are different languages to do all this in; mmmm, Perl 5.0
>for example but I like PHP ;-)
If you are using sendmail (or qmail) and you have access to sendmail.conf,
do it just like Perl autoresponders:
Change sendmail.conf to have an EXEC (?) that calls a PHP script which must
live in smrsh directory and must start with:
#!/path/to/php
You'll want to read "man smrsh" and "man sendmail" to get started...
This assumes you compiled PHP as a CGI (or CLI these days) as well as Module
for Apache.
--
Like Music? http://l-i-e.com/artists.htm
Off-Topic: What is the moral equivalent of 'cat' in Windows?