I can send emails perfectly but they are showing on plain text, I have been trying a lot of solutions to display it as HTML trying to put content-type but when I check the headers from the email sent MIME and Content-type headers are missing. What I am doing wrong?
Thank you!
$email = "example@test.com";
$subject = "example subject\r\n";
$msg_body = "example body with some html";
$host = "mail.examplehost.com";
$username = "exampleemail@test.com";
$password = "examplepass";
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$headers = array ('From' => "exampledomain.com",
'To' => $to,
'Subject' => $subject
'MIME-Version' => "1.0",
'Content-type' => "text/html; charset=iso-8859-1"
);
$mail = $smtp->send($to,$headers,$msg_body);