#There are a bunch of redirects that happen, so we automate going through them to get to the login page. while res.code == 301 || res.code == 302 cookie = res.get_cookies uri = res.headers['Location'] vprint_status("Redirected to #{uri}") res = send_request_cgi({'uri' => uri}) end

# e107 also uses a cron job to check bounce jobs, which may not be active. # either cron can be disabled, or bounce checks disabled, so we try to # kick the process manually, however if it doesn't work we'll hope # cron is running and we get a call back anyways.