i want 2 know whether mail() fn. returns any value. i want 2 check whether the fn. has performed its duty(has it successfully sent the mail?), otherwise a sorry message should appear.
It will return a boolean (i.e. true or false) if the command was successful. Just do
if (!(mail(...)) { echo "Sorry, something didn't work right."; } else { echo "Mail sent, have a nice day."; }
hope that helps!
Chris King
I have a script that send mail with mail(). The script sends the mail ok, but the mail function returns false. Has anyone else seen this?
thanks