Commit 802bda92 by Qiang Xue

Merge branch 'master' of git://github.com/yiisoft/yii2

parents 38098b20 9662fdde
......@@ -186,6 +186,10 @@ abstract class BaseMailer extends Component implements MailerInterface, ViewCont
if (isset($text)) {
$message->setTextBody($text);
} elseif (isset($html)) {
if (preg_match('|<body[^>]*>(.*?)</body>|is', $html, $match)) {
$html = $match[1];
}
$html = preg_replace('|<style[^>]*>(.*?)</style>|is', '', $html);
$message->setTextBody(strip_tags($html));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment