# Mailing to a form field

**URL:** <https://www.ruby-forum.com/t/mailing-to-a-form-field/105336>\
**Category:** Rails\
**Created:** [May 29, 2007, 12:31am UTC](https://www.ruby-forum.com/t/mailing-to-a-form-field/105336 "2007-05-29T00:31:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [May 29, 2007, 12:31am UTC](https://www.ruby-forum.com/t/mailing-to-a-form-field/105336/1 "2007-05-29T00:31:26Z")

</div>

I have generated a mailer. The name of the mailer class is ‘Taf’ and  
the name of my email action method is ‘confirm’. I added an action  
method named taf\_send to an existing controller which happened to be  
named ‘specialoffer’ as follows:

class SpecialofferController \< ApplicationController

# Other actions have been omitted for clarity.

def taf\_send  
Taf.deliver\_confirm()  
end  
end

I then call ‘/specialoffer/taf\_send’ from the action attribute of a  
form tag. Everything seems to work fine as I have a fixed email  
address set for a single  
recipient in ‘app/models/taf.rb’. However, in the real world, the  
email address of the intended recipient is contained in a field in the  
form that calls /specialoffer/taf\_send’. The name of the field  
happens to be ‘Email’. The question is, how can I get at that the  
value of that form field from my confirm action method so that I can  
grab the address from the form and and direct the mail to it?

Thanks for any input.

```
  ... doug
```

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [May 29, 2007, 5:00am UTC](https://www.ruby-forum.com/t/mailing-to-a-form-field/105336/2 "2007-05-29T05:00:43Z")

</div>

I got it figured out.  
Thanks, though.

```
  ... doug
```
