diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index d6d1d8c2d..45082acc8 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project make usage of the [Yii Versioning Strategy](https://github.com/yiisoft/yii2/blob/master/docs/internals/versions.md). In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md). +## 1.0.21 + ++ [#1942](https://github.com/luyadev/luya/issues/1942) Use phpmailers `setFrom()` method instead of `$from` and `$fromName` property. + ## 1.0.20 (5. August 2019) + [#1940](https://github.com/luyadev/luya/issues/1940) Add Url helper methods `cleanHost()` and `domain()`. diff --git a/core/components/Mail.php b/core/components/Mail.php index a61932987..eba42a423 100644 --- a/core/components/Mail.php +++ b/core/components/Mail.php @@ -131,8 +131,7 @@ public function getMailer() if ($this->_mailer === null) { $this->_mailer = new PHPMailer(); $this->_mailer->CharSet = 'UTF-8'; - $this->_mailer->From = $this->from; - $this->_mailer->FromName = $this->fromName; + $this->_mailer->setFrom($this->from, $this->fromName); $this->_mailer->isHTML(true); $this->_mailer->XMailer = ' '; // if sending over smtp, define the settings for the smpt server