Page 1 of 1

problem with sendmail+php

Posted: Fri Dec 19, 2003 8:04 am
by bouboul
i'm trying to send a message from a small php script :


<?php
$to = "issa@dyn-10-213.nur.local";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body))
{
echo("<p>Message sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>


when i'm running the following script i'm getting : Message sent!
up to that point there is still no problem.
the problem arise when i want to retrieve this message in my sendmail server. i don't find the message .

when i'm doing tail -f /var/log/maillog i'm gettting the message below :


Dec 26 21:44:39 dyn-10-213 sendmail[2178]: hBQJidDa002178: Losing ./qfhBQJidDa002178: savemail panic
Dec 26 21:44:39 dyn-10-213 sendmail[2178]: hBQJidDa002178: SYSERR(root): savemail: cannot save rejected email anywhere



i'm some how confuse because in my php.ini file php seems to be configured to work with sendmail, i can say that because of the following :

For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i


could anyone have suggestion about solving this problem.


thanx in advance

Posted: Sat Dec 20, 2003 12:33 pm
by genetix
your missing the from field.

Posted: Sat Dec 20, 2003 4:22 pm
by Pyrite
Change your sendmail_path to:

Code: Select all

sendmail_path = /usr/sbin/sendmail -t -i -f your@email.address.com
You could also try specifying that in the mail function:

mail($to, $subject, $body, $from, "-f $from_email_address");