public function configureIlluminateMailer(MailerContract $mailer): MailerContract
    {
        $from = $this->memory->get('email.from');

        // If a "from" address is set, we will set it on the mailer so that
        // all mail messages sent by the applications will utilize the same
        // "from" address on each one, which makes the developer's life a
        // lot more convenient.
        if (\is_array($from) && ! empty($from['address'])) {
            $this->from = $from;
            $mailer->alwaysFrom($from['address'], $from['name']);
        }

        if ($this->queue instanceof QueueContract) {
            $mailer->setQueue($this->queue);
        }

        $mailer->setSwiftMailer(new Swift_Mailer($this->transport->driver()));

        return $mailer;
    }
public function configureIlluminateMailer(MailerContract $mailer): MailerContract
    {
        $from = $this->memory->get('email.from');

        // If a "from" address is set, we will set it on the mailer so that
        // all mail messages sent by the applications will utilize the same
        // "from" address on each one, which makes the developer's life a
        // lot more convenient.
        if (\is_array($from) && ! empty($from['address'])) {
            $this->from = $from;
            $mailer->alwaysFrom($from['address'], $from['name']);
        }

        if ($this->queue instanceof QueueContract) {
            $mailer->setQueue($this->queue);
        }

        $mailer->setSwiftMailer(new Swift_Mailer($this->transport->driver()));

        return $mailer;
    }
public function configureIlluminateMailer ( MailerContract $ mailer ) : MailerContract { $ from = $ this -> memory -> get ( 'email.from' ) ; // If a "from" address is set, we will set it on the mailer so that // all mail messages sent by the applications will utilize the same // "from" address on each one, which makes the developer's life a // lot more convenient. if ( \ is_array ( $ from ) && ! empty ( $ from [ 'address' ] ) ) { $ this -> from = $ from ; $ mailer -> alwaysFrom ( $ from [ 'address' ] , $ from [ 'name' ] ) ; } if ( $ this -> queue instanceof QueueContract ) { $ mailer -> setQueue ( $ this -> queue ) ; } $ mailer -> setSwiftMailer ( new Swift_Mailer ( $ this -> transport -> driver ( ) ) ) ; return $ mailer ; }
Setup mailer.

@return \Illuminate\Contracts\Mail\Mailer
Setup mailer .