email = $confirmation->getNewEmail(); $result->username = $confirmation->account->username; $result->code = $confirmation->key; return $result; } public function getTtr() { return 30; } public function canRetry($attempt, $error) { return true; } /** * @param \yii\queue\Queue $queue */ public function execute($queue) { $to = EmailHelper::buildTo($this->username, $this->email); $template = new ChangeEmailConfirmNewEmail($to, $this->username, $this->code); $template->send(); } }