The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

fix for script after disabling 'Nobody'

Discussion in 'General Discussion' started by Def, Aug 11, 2005.

  1. Def

    Def Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Yes, I did try searching first but apparently not hitting the correct search phrase. So I apologize if this has been covered a million times already.

    What does one have to do to their script in order for it to work after disabling 'Nobody' from sending mail?

    This no longer works:
    mail("user@domain.com", "Consumer Complaint", $message, "From: a.user@domain.com", "-t a.user@domain.com")

    What needs to be done short of reenabling 'Nobody' in order for their script to work?

    TIA
     
  2. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    You need to have valid email sender in your script in order to send mails...search the google as well and you will get thousands of such scripts.
     
  3. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I manage to send mail fine from PHP scripts with 'nobody' mail prevented and it has nothing to do with the parameters you supply to the PHP function mail().

    If you check the option:

    Code:
    [x] Prevent the user 'nobody' from sending out mail to remote addresses (php and cgi scripts generally run as nobody if you are not using phpsuexec and suexec respectively.)
    then you must ensure that phpsuexec is enabled. If it is not, PHP will be running as the user 'nobody' and no amount of changing the mail() parameters will help.
     
Loading...

Share This Page