problem with sendmail+php

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
bouboul
Forum Commoner
Posts: 28
Joined: Sat Oct 25, 2003 4:08 am

problem with sendmail+php

Post 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
User avatar
genetix
Forum Contributor
Posts: 115
Joined: Fri Aug 01, 2003 7:40 pm
Location: Sask, Regina
Contact:

Post by genetix »

your missing the from field.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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");
Post Reply