private static function check($smtp)
    {
        exception_if(empty($smtp->host), SmtpParameterNotFoundException::class, 'host');
        exception_if(empty($smtp->port), SmtpParameterNotFoundException::class, 'port');
        exception_if(empty($smtp->encryption), SmtpParameterNotFoundException::class, 'encryption');
        exception_if(empty($smtp->username), SmtpParameterNotFoundException::class, 'username');
        exception_if(empty($smtp->password), SmtpParameterNotFoundException::class, 'password');
        exception_if(empty($smtp->sender_email), SmtpParameterNotFoundException::class, 'sender email');
        exception_if(empty($smtp->sender_name), SmtpParameterNotFoundException::class, 'sender name');

        return true;
    }