PHP Shell Script (with MySql)
Hello all:
Here is my code Code:
#!/usr/local/bin/php -q Almost everything runs properly, but i get error Code:
sh: line 1: -t: command not found Code:
mail($to, $subject, $body); What is the problem and how can I correct it? |
Is sendmail listed in your PATH ? PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.
I used the following for: $didgo =mail($to, $subject, $message, $headers); #error checking for email # if (!$didgo){ echo "EMail could not be sent "; } This way I get immediate feed back if the email can not be sent. |
All times are GMT -5. The time now is 09:45 PM. |