Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP mail function not working, Nobody user prevented.

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

  1. antodeepak

    antodeepak Active Member

    Joined:
    Jan 24, 2005
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    156
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice