public function setSmtpSecurity($security)
    {
        $security = strtoupper($security);
        $validSecurity = [ '', 'TLS', 'SSL' ];

        if (!in_array($security, $validSecurity)) {
            throw new InvalidArgumentException(
                'SMTP Security is not valid. Must be "", "TLS" or "SSL".'
            );
        }

        $this->smtpSecurity = $security;

        return $this;
    }
public function setSmtpSecurity($security)
    {
        $security = strtoupper($security);
        $validSecurity = [ '', 'TLS', 'SSL' ];

        if (!in_array($security, $validSecurity)) {
            throw new InvalidArgumentException(
                'SMTP Security is not valid. Must be "", "TLS" or "SSL".'
            );
        }

        $this->smtpSecurity = $security;

        return $this;
    }
public function setSmtpSecurity ( $ security ) { $ security = strtoupper ( $ security ) ; $ validSecurity = [ '' , 'TLS' , 'SSL' ] ; if ( ! in_array ( $ security , $ validSecurity ) ) { throw new InvalidArgumentException ( 'SMTP Security is not valid. Must be "", "TLS" or "SSL".' ) ; } $ this -> smtpSecurity = $ security ; return $ this ; }
Set the SMTP security type to be used.

@param  string $security The SMTP security type (empty, "TLS", or "SSL").
@throws InvalidArgumentException If the security type is not valid (empty, "TLS", or "SSL").
@return self
Set the SMTP security type to be used .