Cakephp3在电子邮件组件中设置标题:邮件将发送垃圾邮件

I need to set headers as followings

$headers ="From:<$from>
";
$headers.="MIME-Version: 1.0
";
$headers.="Content-type: text/html; charset=iso 8859-1";

how can i write it to Email component in cakephp3. Code is following

$this->email->emailFormat('html');
$this->email->from([$data['sender'] => $data['sender_name']]);
$this->email->to($to)
$this->email->subject($data['subject']);
$this->email->send();

I want this to prevent spam mail. Mails are going to spam .Thanks all .

You can use set headers function-

$this->email->setHeaders(['From: ','MIME-Version: 1.0 ','Content-type: text/html; charset=iso 8859-1']);