Try adding as a first line to your php script:

#!/usr/local/bin/php -q

And make the script executable.

Then use:

'[EMAIL PROTECTED]' -> '| /home/raincross-tech/testmail.php'

Don't know if it will work, but worth a try.

jbw

Micah Stevens wrote:
Nope. That didn't work either. Thanks though. I just commented out all the code in the script and replaced it with a single command to email a predifined message to me. That way I'm eliminating any problems with the code reading the pipe, etc.. and it still isn't working. I'm assuming that the script isn't even being run by the pipe command. Not sure if it makes a difference, but I'm running DBMail 1.1, not CVS.
-Micah


On Wednesday 14 May 2003 10:45 am, Bret Baptist wrote:

Try using '!/usr/local/bin/php -q /home/raincross-tech/testmail.php'. Notice that it is bang instead of pipe. That worked for a script that I
was trying to run.


Bret.

On Wednesday 14 May 2003 12:22 pm, Micah Stevens wrote:

Hi,

I'm trying to pipe messages to a PHP script and although I can test the
script on the command line by piping a text file with an email message in
it, and it works fine, it's not getting run by DBMail.

My alias is:

'[EMAIL PROTECTED]' -> '| /usr/local/bin/php -q
/home/raincross-tech/testmail.php'

The log seems to indicate that it's successfully piping, but I get no
results. It may be my script, but like I said, when I run this command:

cat mail.txt |   /usr/local/bin/php -q /home/raincross-tech/testmail.php

it works great.

Any ideas? BTW, it's supposed to forward the mail to a list of recipients
in a database table.

I've attached a snippet of the log if you're interested.

Thanks!
-Micah


_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to