3 I am getting error in sending mail.here below i have mentioned my code.
in controller file
var $components = array(‘RequestHandler’, ‘Filter’,’Image’,’Email’,’Captcha’,’RandomHelper’);
then in my function i have write
$this->Email->from = $from;
$this->Email->subject = 'Approval Form: ';
$this->Email->delivery = 'debug';
$this->Email->template = 'adminemail';
$this->Email->sendAs = 'html';
$this->Email->send();
i dont want to send mail using SMTP. when i run this code the error is for missing helper file it tel me “rror: The helper file app/views/helpers/email.php can not be found or does not exist.” Anyone can pls help me
Email is not a helper, it was a component in 1.3 and in 2.0 there is CakeEmail
You do not load helpers in the component property, use public $helpers = array(‘MyHelper’);
Helpers are loaded without the “Helper” suffix in the $helpers property.
It looks like you do not have any idea of what MVC is or what the difference between helpers and components are. I suggest you to read about MVC and CakePHPs different parts like what the difference is between a component and a helper and a behavior for example.