Topic: Problem implementing basic action mailer tutorial

Hi,

I am trying to implement the tutorial "Send Email using Rails" : http://www.tutorialspoint.com/ruby-on-r … -email.htm

and besides the classic problems of running tutorials designed with rails 1.xx with rails 2
(start_form_tag deprecated, .rhtml) and a typo in the tutorial as index.html.erb should be in app\views\emailer and not app\views\emails, I have the following error when sending the email from the form :

"Routing Error
No route matches "/sendmail" with {:method=>:post}"

Any hints on where this comes from ?

sendmail method does exist in my EmailerController !

Thanks in advance for your help.

Alain

Last edited by alaini (2008-04-22 05:36:37)

Re: Problem implementing basic action mailer tutorial

Hello, I'having the same problem. Did you find the solution? Thank you

Re: Problem implementing basic action mailer tutorial

Hi,

You need to add a custom route in routes.rb:

 map.sendmail '/sendmail', :controller => "emailer", :action => "sendmail"

Regards

Robin