Piping Email to PHP Script

Avatar
  • Answered
I am setting up filters on one of my email addresses, so that when it receives an email including a specific string, the filter pipes it to the program at username/foldername/script.php. I have tried many variations to get it to the right place so it can be processed, does it have to be, including /home/username/foldername/script.php, I looked at so many different things. username is my account, foldername is permission 0700 like cpanel.net recommended, I tried with and without the hashbang #!/usr/bin/php -q so please give direction.
Avatar
johnpaulb-imhs1

Hello inmoFan,

Thank you for your question regarding piping an email to a PHP Script. Here are the common file permissions:

public_html - 750

Folders - 755

CGI and Perl scripts - 755

.html .php and other Document Types - 644

If your filter is on the same server as the script, you should use the full path such as /home/userna998/public_html/script.php

Thank you,

John-Paul