can't send a mail

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sam Hou

    #1

    can't send a mail

    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=<20031210 0148.hBA1mWr600 7859@flash.nind s.nih.gov>,
    relay=nobody@lo calhost

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

    #2
    Re: can't send a mail


    "Sam Hou" <ssmilemonkey@h otmail.com> wrote in message
    news:5a3b225f.0 312101120.67626 872@posting.goo gle.com...[color=blue]
    > 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=<20031210 0148.hBA1mWr600 7859@flash.nind s.nih.gov>,
    > relay=nobody@lo calhost
    >
    > I can use sendmail "address" to send out the email from my personal
    > accout. Any one help?[/color]

    That is odd.

    if you can execute sendmail from a prompt like "sendmail
    anybody@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 <xyzzy@somewher e.com>\r \n";
    $headers .= "Bcc: Someone Else <someoneelse@so mewhere.com>\r \n";
    $subject = "Testing";
    $msg = "this is test";
    $to = somebody@somewh ere.com;
    $mailResult = mail($to,$subje ct,$msg,$header s);
    ?>






    Comment

    • Manuel Lemos

      #3
      Re: can't send a mail

      Hello,

      On 12/10/2003 05:20 PM, Sam Hou wrote:[color=blue]
      > 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=<20031210 0148.hBA1mWr600 7859@flash.nind s.nih.gov>,
      > relay=nobody@lo calhost
      >
      > I can use sendmail "address" to send out the email from my personal
      > accout. Any one help?[/color]

      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/

      Comment

      Working...