--0016368332f46b341e048bf4046b
Content-Type: text/plain; charset=UTF-8

On Wed, Jul 21, 2010 at 6:12 AM, Chugm 456789 <chugm456789 / googlemail.com>wrote:

> Hallo everybody,
>
> I try to write a script that checks my gmails automatically. But when I
> try to submit the login form, I get the exception 404 > Net::HTTPNotFound. Can anyone help?
>
> Code is:
>
> @LoginUrl  http://mail.google.com/mail/'
> @agent  echanize.new
> @agent.keep_alive  alse
> @agent.user_agent  Mozilla/5.0 (Windows; U; Windows NT 5.0; de;
> rv:1.9.2) Gecko/20100115 Firefox/3.6'
> @agent.follow_meta_refresh  rue
> @agent.redirect_ok  rue
> @agent.ca_file  cacert.pem'
>
> login_page  agent.get(@LoginUrl)
>
> begin
>    login_form  ogin_page.forms.first
>    login_form.Email  ccount
>    login_form.Passwd  assword
>
>    login_response_page  agent.submit login_form
>
> rescue Exception e
>    print e, "\n"
> end
>
> Thanks in advance!
> --
> Posted via http://www.ruby-forum.com/.
>
>
Hi,

try this:

@agent.submit(login_form,login_form.button_with(:name "SignIn"))

 I'm not sure about the name of the button but you get the idea

--0016368332f46b341e048bf4046b--