Hi,
I'm having some problems using the swiftmailer component described
here: http://bakery.cakephp.org/articles/view/swiftmailer-component-tutorial
When I try to send an email using the following code, I find a php
notice in my logs:
PHP Notice: Undefined variable: swiftMailer_data in /<snip>/app/views/
email_contents/test_html.thtml on line 1
Here's the code I'm using to send from my controller:
if($this->SwiftMailer->connect()) {
$this->SwiftMailer-
>addTo('to','[EMAIL PROTECTED]','Damien');
$this->SwiftMailer-
>addTo('from',"[EMAIL PROTECTED]","from name here");
if(!$this->SwiftMailer->sendView('my test
email','test','both')) {
echo "The mailer failed to Send. Errors:";
pr($this->SwiftMailer->errors());
}
} else {
echo "The mailer failed to connect. Errors:";
pr($this->SwiftMailer->errors());
}
FYI, I have the following components in play:
var $helpers = array('Javascript','DAuth','Html','Form');
var $components = array('DAuth','RequestHandler','SwiftMailer');
I'm not receiving the email - I guess because of the error with
$swiftMailer_data in my (email) view?
Has anyone got any ideas what's causing this and/or where I should
look to fix?
All help and suggestions much appreciated! 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
-~----------~----~----~----~------~----~------~--~---