note 89149 deleted from features.commandline by cmb
| From: | cmb@php.net | Date: | Sun, 30 Jun 2019 09:52:31 +0000 |
| Subject: | note 89149 deleted from features.commandline by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211435@lists.php.net to get a copy of this message | ||
Note Submitter: Willy T. Koch
----
I'm figuring out how to pipe an email to a php script with postfix. For the email
user@example.com:
I created the following line in /etc/aliases:
user: "|/www/file.php"
file.php is chmod 755
This works fine. But I wanted to test this without having to send an email every time. And this took
some searching to figure out, yet it's oh-so simple:
To pipe the file email.txt to the script, write the following in the terminal window:
user@host: php file.php < testepost.txt
I was confused by the | in the aliases file, and didn't get what came after what, etc etc.
Regards,
Willy T. Koch
Norway