CORE\cake\dispatcher.php, line 227
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
> [main] - APP\webroot\index.php, line 88
>
> --
> View this message in
> context:http://cakephp.1045679.n5.nabble.com/SEND-EMAIL-FUNCTION-INSIDE-CONTR...
> Sent from the CakePHP mailing
ge in context:
http://cakephp.1045679.n5.nabble.com/SEND-EMAIL-FUNCTION-INSIDE-CONTROLLER-tp4461556p4469125.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questi
gt; {
> $this->log('Envio do e-mail EMPTY ' . $print_link, 'emails');
>
> exit(0);
>
> }
>
> $text = strip_tags($html);
>
> $subject = 'PCG: Encomenda #'.$encomendaId;
>
> $mail-&g
nda #'.$encomendaId;
$mail->Subject = $subject;
$mail->AltBody = $text;
$mail->MsgHTML($html);
$this->log('Envio do e-mail ' . $subject, 'emails');
if(!$mail->Send())
{
$this->log($mail->
On Tue, Oct 6, 2009 at 1:50 PM, Dave Maharaj :: WidePixels.com
wrote:
> My controller is getting out of control
>
> I have 3 different registration functions which all send emails
>
> such as:
>
> if ($this->User->save($this->data, true,
> array_intersect(array_keys($this->User->schema()), $wh
My controller is getting out of control
I have 3 different registration functions which all send emails
such as:
if ($this->User->save($this->data, true,
array_intersect(array_keys($this->User->schema()), $white))) {
$this->Email->smtpOptions = array(my info here);
We do that very thingy by wrapping the standard, often repeated email
code in another component that uses the Email component,
Then you just have to do something along the lines of [in your
controller]:
var $component => array('Notify' => array('email config params'));
$this->Notify->send('all
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', 't