From 408eee75a90aebc8d19ad638ff52c81cdc22179d Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Wed, 27 Nov 2013 12:58:28 +0400 Subject: [PATCH] Used full method names when sending email in advanced app --- apps/advanced/frontend/controllers/SiteController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/advanced/frontend/controllers/SiteController.php b/apps/advanced/frontend/controllers/SiteController.php index d617d7e..edb9cd9 100644 --- a/apps/advanced/frontend/controllers/SiteController.php +++ b/apps/advanced/frontend/controllers/SiteController.php @@ -160,9 +160,9 @@ class SiteController extends Controller $user->password_reset_token = Security::generateRandomKey(); if ($user->save(false)) { return \Yii::$app->mail->compose('passwordResetToken', ['user' => $user]) - ->from([\Yii::$app->params['supportEmail'] => \Yii::$app->name . ' robot']) - ->to($email) - ->subject('Password reset for ' . \Yii::$app->name) + ->setFrom([\Yii::$app->params['supportEmail'] => \Yii::$app->name . ' robot']) + ->setTo($email) + ->setSubject('Password reset for ' . \Yii::$app->name) ->send(); }