diff --git a/backend/config/params.php b/backend/config/params.php index 7f754b9..231bded 100755 --- a/backend/config/params.php +++ b/backend/config/params.php @@ -1,4 +1,4 @@ 'admin@example.com', + 'adminEmail' => 'supp0rt.friday@yandex.ru', ]; diff --git a/common/config/params.php b/common/config/params.php index 4ec9ba6..52a439b 100755 --- a/common/config/params.php +++ b/common/config/params.php @@ -1,6 +1,9 @@ 'admin@example.com', - 'supportEmail' => 'support@example.com', + 'adminEmail' => 'supp0rt.friday@yandex.ru', + 'supportEmail' => 'supp0rt.friday@yandex.ru', + 'senderEmail' => 'supp0rt.friday@yandex.ru', + 'senderName' => 'Friday.support mailer', 'user.passwordResetTokenExpire' => 3600, + 'user.passwordMinLength' => 8, ]; diff --git a/console/config/params.php b/console/config/params.php index 7f754b9..231bded 100755 --- a/console/config/params.php +++ b/console/config/params.php @@ -1,4 +1,4 @@ 'admin@example.com', + 'adminEmail' => 'supp0rt.friday@yandex.ru', ]; diff --git a/frontend/config/params.php b/frontend/config/params.php index 7f754b9..231bded 100755 --- a/frontend/config/params.php +++ b/frontend/config/params.php @@ -1,4 +1,4 @@ 'admin@example.com', + 'adminEmail' => 'supp0rt.friday@yandex.ru', ]; diff --git a/frontend/models/ContactForm.php b/frontend/models/ContactForm.php index 8c00d47..c96be3a 100755 --- a/frontend/models/ContactForm.php +++ b/frontend/models/ContactForm.php @@ -51,10 +51,18 @@ class ContactForm extends Model public function sendEmail($email) { return Yii::$app->mailer->compose() - ->setTo($email) - ->setFrom([$this->email => $this->name]) + ->setTo($this->email) + ->setFrom([Yii::$app->params['senderEmail'] => Yii::$app->params['senderName']]) +// ->setReplyTo([$this->email => $this->name]) ->setSubject($this->subject) ->setTextBody($this->body) ->send(); + +// return Yii::$app->mailer->compose() +// ->setTo($email) +// ->setFrom([$this->email => $this->name]) +// ->setSubject($this->subject) +// ->setTextBody($this->body) +// ->send(); } }