how can i get email address as an input param from user and then send
email to that address?
There’s a base class for that stuff, ActionMailer : http://api.rubyonrails.org/classes/ActionMailer/Base.html
You juste have to take the address you got from the form and send an email following the described procedure. You can even send attachments ^^
If you want further details feel free to ask, but I never had any problem with this class.