I am using mechanize library to do automated form posting. Unfortunately
doesn’t seem to work for only gumtree.
Below is the snippet of code that I am using. xxxxx represent the
post id and ziz value. Similar code works for other web applications
gumtree fails. Is it because, the form has a file upload control in it
agent = WWW::Mechanize.new
agent.user_agent_alias = ‘Windows IE 6’
page = agent.get("
form = page.forms.with.name(“email_friend”).first
form.from_email = ‘firstname.lastname@example.org’
form.message = “direct http post from code”
results = agent.submit(form)