src/Leevel/Mail/Smtp.php
public function makeTransport()
    {
        $transport = new Swift_SmtpTransport(
            $this->option['host'],
            $this->option['port']
        );

        if (null !== $this->option['encryption']) {
            $transport->setEncryption(
                $this->option['encryption']
            );
        }

        if (null !== $this->option['username']) {
            $transport->setUsername(
                $this->option['username']
            );

            $transport->setPassword(
                $this->option['password']
            );
        }

        return $transport;
    }
public function makeTransport()
    {
        $transport = new Swift_SmtpTransport(
            $this->option['host'],
            $this->option['port']
        );

        if (null !== $this->option['encryption']) {
            $transport->setEncryption(
                $this->option['encryption']
            );
        }

        if (null !== $this->option['username']) {
            $transport->setUsername(
                $this->option['username']
            );

            $transport->setPassword(
                $this->option['password']
            );
        }

        return $transport;
    }
创建 transport.

@return mixed