By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

can't send a mail

P: n/a
Dear all,
I don't know where my problem is. Hopefully someone can give me
some hint to explore the problem more. I am running Apache 2.0.48
wih PHP 4.3.4. The apache is running as nobody. I want to use the
mail() to send out the email from a web page but it can't work. The
web server is on the red hat linux 9.0 with rpm sendmail-8.12.8-9.90
and sendmail-cf.
In the begining, I got the error message, 'SYSERR(nobody) can not
write to queue directory /var/spool/clientmqueue/ when I use the
mail(). I kind of make some progress if not worse to follow the
sendmail/SECURITY. I don't see the error message above anymore.
However, the mail does not go out. Here is what I get in maillog now.
Dec 9 20:48:32 flash sendmail[7859]: hBA1mWr6007859: from=nobody,
size=112, class=0, nrcpts=0,
msgid=<20*************************@flash.ninds.nih .gov>,
relay=nobody@localhost

I can use sendmail "address" to send out the email from my personal
accout. Any one help?
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Sam Hou" <ss**********@hotmail.com> wrote in message
news:5a**************************@posting.google.c om...
Dear all,
I don't know where my problem is. Hopefully someone can give me
some hint to explore the problem more. I am running Apache 2.0.48
wih PHP 4.3.4. The apache is running as nobody. I want to use the
mail() to send out the email from a web page but it can't work. The
web server is on the red hat linux 9.0 with rpm sendmail-8.12.8-9.90
and sendmail-cf.
In the begining, I got the error message, 'SYSERR(nobody) can not
write to queue directory /var/spool/clientmqueue/ when I use the
mail(). I kind of make some progress if not worse to follow the
sendmail/SECURITY. I don't see the error message above anymore.
However, the mail does not go out. Here is what I get in maillog now.
Dec 9 20:48:32 flash sendmail[7859]: hBA1mWr6007859: from=nobody,
size=112, class=0, nrcpts=0,
msgid=<20*************************@flash.ninds.nih .gov>,
relay=nobody@localhost

I can use sendmail "address" to send out the email from my personal
accout. Any one help?


That is odd.

if you can execute sendmail from a prompt like "sendmail
an*****@anwhere.com" , there isn't much else to it. Forget all the
sendmail/SECURITY stuff - your problem is in PHP

One thing that looks odd is your from=nobody entry in your maillog.
What does your php_info() look like for mail configs ?
Also, try overriding the FROM with headers

<?
$headers = "From: xyzzy <xy***@somewhere.com>\r \n";
$headers .= "Bcc: Someone Else <so*********@somewhere.com>\r \n";
$subject = "Testing";
$msg = "this is test";
$to = so******@somewhere.com;
$mailResult = mail($to,$subject,$msg,$headers);
?>


Jul 17 '05 #2

P: n/a
Hello,

On 12/10/2003 05:20 PM, Sam Hou wrote:
Dear all,
I don't know where my problem is. Hopefully someone can give me
some hint to explore the problem more. I am running Apache 2.0.48
wih PHP 4.3.4. The apache is running as nobody. I want to use the
mail() to send out the email from a web page but it can't work. The
web server is on the red hat linux 9.0 with rpm sendmail-8.12.8-9.90
and sendmail-cf.
In the begining, I got the error message, 'SYSERR(nobody) can not
write to queue directory /var/spool/clientmqueue/ when I use the
mail(). I kind of make some progress if not worse to follow the
sendmail/SECURITY. I don't see the error message above anymore.
However, the mail does not go out. Here is what I get in maillog now.
Dec 9 20:48:32 flash sendmail[7859]: hBA1mWr6007859: from=nobody,
size=112, class=0, nrcpts=0,
msgid=<20*************************@flash.ninds.nih .gov>,
relay=nobody@localhost

I can use sendmail "address" to send out the email from my personal
accout. Any one help?


I think you need to set the Return-Path address to a valid address. You
can do that with mail() 5th parameter or try this class setting the
Return-Path header to whatever is your To: address. Take a look at the
examples:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.