protected function setSmtpOptions(PHPMailer $mail)
    {
        $config = $this->config();
        if (!$config['smtp']) {
            return;
        }

        $this->logger->debug(
            sprintf('Using SMTP "%s" server to send email', $config['smtp_hostname'])
        );

        $mail->isSMTP();
        $mail->Host       = $config['smtp_hostname'];
        $mail->Port       = $config['smtp_port'];
        $mail->SMTPAuth   = $config['smtp_auth'];
        $mail->Username   = $config['smtp_username'];
        $mail->Password   = $config['smtp_password'];
        $mail->SMTPSecure = $config['smtp_security'];
    }
protected function setSmtpOptions(PHPMailer $mail)
    {
        $config = $this->config();
        if (!$config['smtp']) {
            return;
        }

        $this->logger->debug(
            sprintf('Using SMTP "%s" server to send email', $config['smtp_hostname'])
        );

        $mail->isSMTP();
        $mail->Host       = $config['smtp_hostname'];
        $mail->Port       = $config['smtp_port'];
        $mail->SMTPAuth   = $config['smtp_auth'];
        $mail->Username   = $config['smtp_username'];
        $mail->Password   = $config['smtp_password'];
        $mail->SMTPSecure = $config['smtp_security'];
    }
protected function setSmtpOptions ( PHPMailer $ mail ) { $ config = $ this -> config ( ) ; if ( ! $ config [ 'smtp' ] ) { return ; } $ this -> logger -> debug ( sprintf ( 'Using SMTP "%s" server to send email' , $ config [ 'smtp_hostname' ] ) ) ; $ mail -> isSMTP ( ) ; $ mail -> Host = $ config [ 'smtp_hostname' ] ; $ mail -> Port = $ config [ 'smtp_port' ] ; $ mail -> SMTPAuth = $ config [ 'smtp_auth' ] ; $ mail -> Username = $ config [ 'smtp_username' ] ; $ mail -> Password = $ config [ 'smtp_password' ] ; $ mail -> SMTPSecure = $ config [ 'smtp_security' ] ; }
Set the SMTP's options for PHPMailer.

@param PHPMailer $mail The PHPMailer to setup.
@return void
Set the SMTP s options for PHPMailer .