I was facing issue when I was sending email, then I was getting message in the footer of the email. Message is "This email was sent using the cakephp framework". In order to remove this message you need to make sure that you have set the second parameter to null from the template method.
So don't do:
$Email->template('yourTemplate', 'default');
do:
$Email->template('yourTemplate', null);
This is the email code for cakehp 2.*
public function _sendemail($from,$to,$subject,$data=array(),$template=''){
$this->layout=false;
$this->render(false);
App::uses('CakeEmail', 'Network/Email');
$Email = new CakeEmail();
$Email->from(array($from => 'Tagsom'));
$Email->to($to);
$Email->subject($subject);
$Email->template($template,null);
$Email->emailFormat('html');
$Email->viewVars($data);
$Email->send();
}
Thanks for reading the blog.
0 Comment(s)