Фикс получателя для формы обратной связи

This commit is contained in:
ErickSkrauch 2016-10-07 17:45:06 +03:00
parent 862c2d467e
commit ad058664db

View File

@ -35,8 +35,8 @@ class FeedbackForm extends ApiForm {
/** @var \yii\swiftmailer\Mailer $mailer */
$mailer = Yii::$app->mailer;
$fromEmail = Yii::$app->params['supportEmail'];
if (!$fromEmail) {
$supportEmail = Yii::$app->params['supportEmail'];
if (!$supportEmail) {
throw new InvalidConfigException('Please specify supportEmail value in app params');
}
@ -47,7 +47,7 @@ class FeedbackForm extends ApiForm {
'account' => $account,
]);
$message
->setTo($this->email)
->setTo($supportEmail)
->setFrom([$this->email => $account ? $account->username : $this->email])
->setSubject($this->subject);