diff --git a/CHANGELOG.md b/CHANGELOG.md index f7b0fb0b9..474f7a4a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ LUYA CHANGELOG **BC BREAKS** See [UPGRADE.md](UPGRADE.md) as we have made some major changes. +- `#826` Fixed deprecated function call in FormBlock. - `#787` Fixed bug with sort block problem. - `#822` zaa-checkbox-array renamed variables. - `#818` Added basic implementation of page version in cms (run `./vendor/bin/luya commands cmsadmin updater/version` once after upgrading to beta6). diff --git a/core/components/Mail.php b/core/components/Mail.php index e56173c0d..feaaca571 100644 --- a/core/components/Mail.php +++ b/core/components/Mail.php @@ -31,22 +31,49 @@ class Mail extends \yii\base\Component { private $_mailer = null; + /** + * @var string sender email address + */ public $from = 'php@zephir.ch'; + /** + * @var string sender name + */ public $fromName = 'php@zephir.ch'; + /** + * @var string email server host address + */ public $host = 'mail.zephir.ch'; + /** + * @var string email server username + */ public $username = 'php@zephir.ch'; + /** + * @var string email server password + */ public $password = null; // insert password + /** + * @var bool disable if you want to use old PHP sendmail + */ public $isSMTP = true; + /** + * @var string alternate text message if email client doesn't support HTML + */ public $altBody = 'Please use a HTML compatible E-Mail-Client to read this E-Mail.'; + /** + * @var int email server port + */ public $port = 587; + /** + * @var bool enable debug output mode 'Data and commands' + */ public $debug = false; /** diff --git a/modules/cmsadmin/src/blocks/FormBlock.php b/modules/cmsadmin/src/blocks/FormBlock.php index f1ec5ebc5..928424538 100644 --- a/modules/cmsadmin/src/blocks/FormBlock.php +++ b/modules/cmsadmin/src/blocks/FormBlock.php @@ -93,10 +93,10 @@ public function extraVars() public function sendMail($message, $email, $name) { $mail = Yii::$app->mail; + $mail->fromName = $name; + $mail->from = $email; $mail->compose($this->getVarValue('subjectText', $this->defaultMailSubject), $message); $mail->address($this->getVarValue('emailAddress'), $name); - $mail->mailer()->From = $email; - $mail->mailer()->FromName = $name; if (!$mail->send()) { return 'Error: '.$mail->error();