LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP and sendmail not being friendly (https://www.linuxquestions.org/questions/linux-software-2/php-and-sendmail-not-being-friendly-145104/)

Rotwang 02-12-2004 12:25 AM

PHP and sendmail not being friendly
 
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("me@mydom.com", "wohoo", "I rule", "From:\"You\" <\"you@yourcompany.com\">\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.

So:
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.


All times are GMT -5. The time now is 09:37 PM.