# Regarding mail in ruby on rails

**URL:** <https://www.ruby-forum.com/t/regarding-mail-in-ruby-on-rails/108226>\
**Category:** Rails\
**Created:** [June 30, 2007, 3:23pm UTC](https://www.ruby-forum.com/t/regarding-mail-in-ruby-on-rails/108226 "2007-06-30T15:23:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [June 30, 2007, 3:23pm UTC](https://www.ruby-forum.com/t/regarding-mail-in-ruby-on-rails/108226/1 "2007-06-30T15:23:16Z")

</div>

Hi all,  
I am using action mailer to send mail,in that i want one option  
called reply\_to

if i put @reply\_to=‘removed\_email\_address@domain.invalid’,…it is not working…how to put reply  
to.If anyone knows help me

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [July 1, 2007, 3:18pm UTC](https://www.ruby-forum.com/t/regarding-mail-in-ruby-on-rails/108226/2 "2007-07-01T15:18:19Z")

</div>

Shiva K. wrote:

> Hi all,  
> I am using action mailer to send mail,in that i want one option  
> called reply\_to
> 
> if i put @reply\_to=‘removed\_email\_address@domain.invalid’,…it is not working…how to put reply  
> to.If anyone knows help me

you can add any header to the email you want, by using “header”.

check out

[http://caboo.se/doc/classes/ActionMailer/Base.html](http://caboo.se/doc/classes/ActionMailer/Base.html)

you can do something like the below. i’d make sure though, that the  
header you determine will go along with the conventional header (i  
belive it is Reply-to and not reply\_to).

class Notifier \< ActionMailer::Base  
def signup\_notification(recipient)  
recipients recipient.email\_address\_with\_name  
from “removed\_email\_address@domain.invalid”  
subject “New account information”  
body :account =\> recipient

```
 headers 'Reply-to' => 'removed_email_address@domain.invalid'

```

end  
end

HTH …

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [July 2, 2007, 7:47am UTC](https://www.ruby-forum.com/t/regarding-mail-in-ruby-on-rails/108226/3 "2007-07-02T07:47:56Z")

</div>

Thanks shai  
Its working now.Thanks for ur help.

Shai R. wrote:

> Shiva K. wrote:
> 
> > Hi all,  
> > I am using action mailer to send mail,in that i want one option  
> > called reply\_to
> > 
> > if i put @reply\_to=‘removed\_email\_address@domain.invalid’,…it is not working…how to put reply  
> > to.If anyone knows help me
> 
> you can add any header to the email you want, by using “header”.
> 
> check out
> 
> [http://caboo.se/doc/classes/ActionMailer/Base.html](http://caboo.se/doc/classes/ActionMailer/Base.html)
> 
> you can do something like the below. i’d make sure though, that the  
> header you determine will go along with the conventional header (i  
> belive it is Reply-to and not reply\_to).
> 
> class Notifier \< ActionMailer::Base  
> def signup\_notification(recipient)  
> recipients recipient.email\_address\_with\_name  
> from “removed\_email\_address@domain.invalid”  
> subject “New account information”  
> body :account =\> recipient
> 
> ```
> headers 'Reply-to' => 'removed_email_address@domain.invalid'
> 
> ```
> 
> end  
> end
> 
> HTH …
