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.

PHP mail function not working, Nobody user prevented.

Discussion in 'E-mail Discussions' started by antodeepak, Jan 25, 2006.

  1. antodeepak

    antodeepak Active Member

    Joined:
    Jan 24, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    kerala, India
    Hello biggies,

    Thought to share a thread on issue with php Mail function + nobody user.

    If the nobody user got blocked at you server and if it is causing any issue with you form mail, you can do as follows.

    Enable phpsuexec - You can implement this by compeiling the php using the script "easyapache".

    Inlcude the PEAR mail function with your form Mail and also include Mail.php
    You can use the following PEAR Mail function.

    <?php
    include('Mail.php');

    $recipients = 'testing@gmail.com';

    $headers['From'] = 'test@testing.com';
    $headers['To'] = 'testing@gmail.com';
    $headers['Subject'] = 'Test message';

    $body = 'Test message';

    $params['host'] = 'mail.domain.org';
    $params['auth'] = TRUE;
    $params['username'] = 'testing@testing.com';
    $params['password'] = 'test';
    // Create the mail object using the Mail::factory method
    $mail_object =& Mail::factory('smtp', $params);

    $mail_object->send($recipients, $headers, $body);?>

    The following url's will help you to integrate it in a easy.

    LINKS
    http://pear.php.net/manual/en/
    http://pear.php.net/manual/en/package.mail.mail.send.php
    http://pear.php.net/manual/en/package.mail.mail.factory.php
    http://pear.php.net/package/Mail
     
Loading...

Share This Page