Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to remove "this email was sent using the cakephp framework"

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 392
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: