Or you could make it a Component itself. class MailComponent extends Object {
var $components = array('Email'); function simplemail($to, $subject, $body) { $mail_settings = Configure::read('Mail'); $this->Email->from = $mail_settings['from_name'] . ' <' . $mail_settings['from_mail'] . '>'; $this->Email->to = $to; $this->Email->subject = $subject; debug($this->Email); //$this->Email->send($body); } } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---