public function init() { parent::init(); $mailer = Yii::createComponent($this->mail); $mailer->init(); $this->setMail($mailer); }