I'm trying to extend the email component. The code looks kind like
this:
class MailerComponent extends EmailComponent {
public $sendAs = 'text';
public $delivery = 'smtp';
public $xMailer = 'Postman';
public $smtpOptions;
public function initialize(&$controller) {
$this->smtpOptions = Configure::read('Email.SMTPConfig');
parent::initialize(&$controller);
}
}
(http://erhanabay.com/2009/01/29/make-cakephp-email-component-
reusable/)
The problem is "smtpOptions" property which is null when i'm using the
component. When I tried set "smtpOptions" in "startup()" method
everything was ok. What's the problem with "initialize()"?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---