Is there a easy way to set this up so it could be called from different
controllers? Instead of putting that chunk repeated in different controllers
So in a controller call the function anywhere
$this->Model->Email->send($template , $subject)
$this->Email->smtpOptions = array('port' => '26', 'timeout' => '30', 'host'
=> 'localhost', 'username' => '[email protected]', 'password' =>
'xxxxxx');
/* Set delivery method */
$this->Email->delivery = 'smtp';
$this->Email->to = $this->data['User']['email'];
$this->Email->subject = 'welcome message';
$this->Email->replyTo = xxxxxxxxxxxx ;
$this->Email->from = 'me';
$this->Email->sendAs = 'html';
$this->Email->template = 'confirmation';
$this->set('name', $this->data['User']['username']);
$this->set('ip_address', $_SERVER['REMOTE_ADDR']);
$this->set('server_name', $_SERVER['SERVER_NAME']);
$this->set('slug', $this->data['User']['slug']);
$this->set('code', $this->data['User']['confirm_code']);
Dave
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---