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;
    }