In a php script when I try to call mail(), the script hangs in the browser for like two minutes, does't throw any errors, and no email gets sent.
This is how I call it:
mail("email@example.com", "wohoo", "I rule", "From:\"You\" <\"firstname.lastname@example.org\">\n");
In my php.ini file I have:
sendmail_path = /usr/sbin/sendmail -t -i
and yes, that's the correct path to sendmail.
I've done some searches on this forum and some of the advice (on similar but not quite the same problems) says to change sendmail.cf. But when I open sendmail.cf it says near the top:
"DO NOT EDIT THIS FILE! Only edit the source .mc file."
I installed sendmail using Mandrake's package manager. (Mandrake 9.2). I've made no changes to sendmail's config at all since installing it (maybe that's the problem). I only need sendmail to work for sending mail from PHP, not recieving mail.
What do I have to do to make sendmail work?
and: How do I test to see if sendmail is working? Like can I run it from commandline? I tried this : http://tinyurl.com/3ygk4
But what happened was, the "." didn't end it, it was still taking more input.