public function sendEmail()
	{
		/* @var $user User */
		$user = User::findOne([
			'status' => User::STATUS_ACTIVE,
			'email' => $this->email,
		]);

		if ($user) {
			$user->generatePasswordResetToken();
			if ($user->save()) {
				return \Yii::$app->mailer->compose('@auth/views/mail/passwordResetToken', ['user' => $user])
										 ->setFrom([\Yii::$app->getModule('auth')->supportEmail => \Yii::$app->name])
										 ->setTo($this->email)
										 ->setSubject(Yii::t('auth.reset-password', 'Password reset for {name}', ['name' => \Yii::$app->name]))
										 ->send();
			}
		}

		return false;
	}
public function sendEmail()
	{
		/* @var $user User */
		$user = User::findOne([
			'status' => User::STATUS_ACTIVE,
			'email' => $this->email,
		]);

		if ($user) {
			$user->generatePasswordResetToken();
			if ($user->save()) {
				return \Yii::$app->mailer->compose('@auth/views/mail/passwordResetToken', ['user' => $user])
										 ->setFrom([\Yii::$app->getModule('auth')->supportEmail => \Yii::$app->name])
										 ->setTo($this->email)
										 ->setSubject(Yii::t('auth.reset-password', 'Password reset for {name}', ['name' => \Yii::$app->name]))
										 ->send();
			}
		}

		return false;
	}
public function sendEmail ( ) { /* @var $user User */ $ user = User :: findOne ( [ 'status' => User :: STATUS_ACTIVE , 'email' => $ this -> email , ] ) ; if ( $ user ) { $ user -> generatePasswordResetToken ( ) ; if ( $ user -> save ( ) ) { return \ Yii :: $ app -> mailer -> compose ( '@auth/views/mail/passwordResetToken' , [ 'user' => $ user ] ) -> setFrom ( [ \ Yii :: $ app -> getModule ( 'auth' ) -> supportEmail => \ Yii :: $ app -> name ] ) -> setTo ( $ this -> email ) -> setSubject ( Yii :: t ( 'auth.reset-password' , 'Password reset for {name}' , [ 'name' => \ Yii :: $ app -> name ] ) ) -> send ( ) ; } } return false ; }
Sends an email with a link, for resetting the password.

@return boolean whether the email was send
Sends an email with a link for resetting the password .