Yii::t('frontend','Verify Code'), 'name' => Yii::t('frontend','Name'), 'email' => Yii::t('frontend','Email'), 'subject' => Yii::t('frontend','Subject'), 'body' => Yii::t('frontend','Body'), ]; } /** * Sends an email to the specified email address using the information collected by this model. * * @param string $email the target email address * @return bool whether the email was sent */ public function sendEmail($email) { return Yii::$app->mailer->compose() ->setTo($email) ->setFrom(Yii::$app->params['noticeEmail']) ->setSubject($this->subject) ->setTextBody($this->body) ->send(); } }