Answer the question
In order to leave comments, you need to log in
Why does the ZURB email template come to the email without CSS styling?
I use ZURB - zurb.com/playground/responsive-email-templates
Took one of their templates.
If I print a letter before sending, then everything is displayed well (CSS styles are applied):
And everything comes to the mail (yandex and gmail) in this form:
CSS styles are lost.
All styles are in the html file, here is the original file - https://yadi.sk/d/i8ksSZgEkXsXb
I send the letter like this:
$subject = 'test';
$msg = file_get_content('zurb.htm');
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "Content-type: text/html; charset=utf-8 \r\n";
$headers .= "From: [email protected]" . $_SERVER['HTTP_HOST'] . " <[email protected]" . $_SERVER['HTTP_HOST'] . ">\r\n";
$headers .= "Bcc: [email protected]" . $_SERVER['HTTP_HOST'] . "\r\n";
mail($orderModel->email, $subject, $msg, $headers);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question