On Fri, 12 Jan 2007 06:04:57 +0100
"noob lenoobie" <[EMAIL PROTECTED]> wrote:

> I'm unable to send mail from php
>
i think that's because you don't have smtp access in a chrooted
environment, but you can get around that with pearmail. 

we installed pearmail and used a function like:

function pearmail($to,$from,$subject,$body)
{
        require('Mail.php'); //Mail.php comes with pearmail
        
        $recipients = $to;
        
        $headers['From']    = $from;
        $headers['To']      = $to;
        $headers['Subject'] = $subject;
        
        $params['host'] = 'localhost';
        
        // Create the mail object using the Mail::factory method
        $mail_object =& Mail::factory('smtp', $params);
        
        $mail_object->send($recipients, $headers, $body);
}

then you use pearmail() instead of mail()

both pearmail and the mini_sendmail ideas are in section 4.6 of this
openbsd virtual domain hosting guide:
http://www.openbsd-wiki.org/index.php?title=Virtual_Domain_Hosting_Guide

this might also be useful:
http://www.cyberciti.biz/tips/howto-php-send-email-via-smtp-authentication.html


-- 
In friendship,
prad

                                      ... with you on your journey
Towards Freedom
http://www.towardsfreedom.com (website)
Information, Inspiration, Imagination - truly a site for soaring I's

Reply via email to