public function setOption(string $key, $value): self
    {
        $options = $this->options;
        $options[$key] = $value;
        // Try to set this, so it will throw an exception
        try {
            (new \Crypt_GPG($options));
        } catch (\PEAR_Exception $ex) {
            throw new GPGMailerException(
                'Could not set option "' . $key . '": ' . $ex->getMessage(),
                $ex->getCode(),
                $ex
            );
        }
        $this->options = $options;
        return $this;
    }