public Response login(String user, String password, String server) {
        greet(server);
        if (!hasExtension("auth"))
            throw new SMTPException("Authentication not supported");
        String authMethod = esmtpFeatures.get("auth").toUpperCase();
        Response response = new Response(-1, "Error");
        boolean authed = false;
        for (String method : authMethods) {
            if (!authMethod.contains(method))
                continue;
            try {
                response = (Response) authMap.get(method).invoke(this, user, password);
            } catch (IllegalAccessException e) {
                continue;
            } catch (InvocationTargetException e) {
                continue;
            }
            if (response.code == 503 || response.code == 235) {
            // Already Authenticated or Successful
                authed = true;
                break;
            }
        }
        if (!authed)
            throw new SMTPAuthenticationException(response);
        return response;
    }