joined:Aug 21, 2016
My host allows me to create "email recipes". One recipe is an "email filter" which allows me to "pass e-mail messages through a program or script.". When setting up the filter I enter a command that will be interpreted using the sh shell when an email comes in to the email address being setup.
I setup my command as "/usr/local/bin/php /path/to/script.php" and I've verified that this runs. My problem is figuring out how to grab the email properties such as the "from", "subject", and "body" fields. I've tried to see what variables are present when the script runs which are _GET, _POST, _COOKIE, _FILES, argv, argc, and _SERVER, but looking at these arrays I don't see these fields being passed.
I'm guessing I need to alter how the command is setup in order to send this data into the script. Does anyone have any direction on how I can achieve that?