html format is different when it is sent in email
Closed this issue · 1 comments
sachy123 commented
First of all , Thank you for such a fantastic extension! everything is working fine! except when the email format is different than in html/ i mean the css is not applied there.
My code is
$mail = new YiiMailer();
$mail->setView('contact');
$mail->setData(
array( 'message' => $html,
'name' => 'John Doe',
'description' => 'Contact form'
));
$mail->setSmtp('smtp.gmail.com', 465, 'ssl', true, 'abcd@gmail.com', '123sk');
// $mail->setData(array('message' => 'Message to send', 'name' => 'John Doe', 'description' => 'Contact form'));
if ($mail->send()) {
echo "Thank you for contacting us. We will respond to you as soon as possible";
} else {
echo "Error while sending email: ".$mail->getError();
}
exit();
So I try to echo the $html contents and I get this >>>>>>>>>
vernes commented
Be sure to include full html layout with css and everything. Check your layout file and view file.