yii\mail\BaseMessage::send PHP Метод

send() публичный Метод

Sends this email message.
public send ( yii\mail\MailerInterface $mailer = null ) : boolean
$mailer yii\mail\MailerInterface the mailer that should be used to send this message. If no mailer is given it will first check if [[mailer]] is set and if not, the "mail" application component will be used instead.
Результат boolean whether this message is sent successfully.
    public function send(MailerInterface $mailer = null)
    {
        if ($mailer === null && $this->mailer === null) {
            $mailer = Yii::$app->getMailer();
        } elseif ($mailer === null) {
            $mailer = $this->mailer;
        }
        return $mailer->send($this);
    }