Piping Emails with PHP

Status
Not open for further replies.

walkerg2

New Member
Messages
1
Reaction score
0
Points
1
I'm trying to make an automatic reply system with PHP. I have set up a forwarder with cPanel. The email is correct, and the value for the "Forward to" column is similar to "|/home/myUsername/directoryOfFile/receiveEmail.php".
The file looks like this:
PHP:
#!/usr/bin/php -q
<?php
mail("myPersonalEmailAddress@gmail.com","Hello World","Test","From: websiteEmail@myDomain.com");
?>
Currently, I'm just trying to get this script to run in the first place, which is why it does not yet actually process any incoming emails.

The file permissions are set to 0755.

My problem is that when I send an email to the address I have made the forwarder for, I do not receive an email to the address specified in the "mail" function. It appears that the script never runs. I think this may be an issue with how I formatted the file, but I am unsure how to fix it.
 
Status
Not open for further replies.
Top