Merge branch '2amigos:master' into patch-1

This commit is contained in:
niciz
2023-12-15 18:31:08 +01:00
committed by GitHub
5 changed files with 25 additions and 10 deletions

View File

@ -83,11 +83,16 @@ class MailService implements ServiceInterface
*/
public function run()
{
return $this->mailer
$result = $this->mailer
->compose(['html' => $this->view, 'text' => "text/{$this->view}"], $this->params)
->setFrom($this->from)
->setTo($this->to)
->setSubject($this->subject)
->send();
if (!$result) {
Yii::error("Email sending failed to '{$this->to}'.", 'mailer');
}
return $result;
}
}