Hi All,

I am trying to use PHPMailer according to the tutorial here:
http://bakery.cakephp.org/articles/view/phpmailer-with-native-api-for-php-5-x
but keep getting errors.

The error I get on my local machine is:
 "There was a problem sending mail: Language string failed to load:
instantiate"

On my shared host:
"Fatal error: Cannot instantiate non-existent class: phpmailer in /
home/.zingaro/cn/cn-dev.com/app/controllers/components/mailer.php on
line 23"

In my controller I have:

var $components = array('Cookie', 'Mailer');
function testmailer(){
        // Set up mail
    $this->Mailer->init();
    $this->Mailer->AddAddress('[EMAIL PROTECTED]');
    $this->Mailer->Subject = 'My Subject';
    // Set PHPMailer vars and call PHPMailer methods (see PHPMailer
API for more info)

    // Set mail body
    ob_start();
    $this->render('you_have_a_connectnote', 'default');
    $this->Mailer->Body = ob_get_clean();

    // Send mail
    if ($this->Mailer->send()) {
        echo 'Mail was sent successfully.';
     } else {
        echo 'There was a problem sending mail: '.$this->Mailer-
>ErrorInfo;
        }
        }

in mailer.php on line 21-23 I have:
 // Include the class file and create PHPMailer instance
        vendor('phpmailer/class.phpmailer');
        $this->m = new PHPMailer;

and the phpmailer folder is in the vendors folder.

Anyone have any ideas on what might be going on?

Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to