# Get email address as param and send email

**URL:** <https://www.ruby-forum.com/t/get-email-address-as-param-and-send-email/171878>\
**Category:** Rails\
**Created:** [July 10, 2009, 5:04pm UTC](https://www.ruby-forum.com/t/get-email-address-as-param-and-send-email/171878 "2009-07-10T17:04:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miss\_moviestar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecae2f/32.png) [@miss\_moviestar](https://www.ruby-forum.com/u/miss_moviestar)\
**Post date:** [July 10, 2009, 5:04pm UTC](https://www.ruby-forum.com/t/get-email-address-as-param-and-send-email/171878/1 "2009-07-10T17:04:12Z")

</div>

hi  
how can i get email address as an input param from user and then send  
email to that address?  
thanks

---

<div class="post-metadata">

**Author:** ![miss\_moviestar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecae2f/32.png) [@miss\_moviestar](https://www.ruby-forum.com/u/miss_moviestar)\
**Post date:** [July 10, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/get-email-address-as-param-and-send-email/171878/2 "2009-07-10T17:15:53Z")

</div>

Hi,

There’s a base class for that stuff, ActionMailer :

> **[ActionMailer::Base](https://api.rubyonrails.org/classes/ActionMailer/Base.html)**
>
> Action Mailer allows you to send email from your application using a mailer model and views. Mailer Models To use Action Mailer, you need to create a mailer model.

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.

Cyril

2009/7/10 Ghazal M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
