# Unable to set the replay-to in ActionMailer

**URL:** <https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160>\
**Category:** Rails\
**Created:** [February 23, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160 "2009-02-23T23:49:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [February 23, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160/1 "2009-02-23T23:49:09Z")

</div>

Hi,

Users can contact me through a form that sends emails through  
ActionMailer, the problem is that I can’t set “reply\_to”, and the “from”  
is actually set to my account on the server which sends the email, so I  
have to copy and paste the user email which is saved in the body in the  
reply of my mail client and that’s painful.

Has anyone been able to set the reply\_to option?

[Peak Obsession](http://api.rubyonrails.com/classes/ActionMailer/Base.html) is rather thin  
on instructions on how to do that? Or did they skip it on purpose?

I also tried setting: headers ‘reply-to’ =\> email, ‘Reply-ro’ =\> email,  
but none worked.

Best regards,

---

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [February 24, 2009, 5:01pm UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160/2 "2009-02-24T17:01:11Z")

</div>

That very document states:

> reply\_to - Takes one or more email addresses. These addresses will be listed as the default recipients when replying to your email. Sets the Reply-To: header.

You should be able to like so:

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

On Feb 23, 5:49 pm, Fernando P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [February 24, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160/3 "2009-02-24T17:26:12Z")

</div>

Jeff Emminger wrote:

> That very document states:
> 
> > reply\_to - Takes one or more email addresses. These addresses will be listed as the default recipients when replying to your email. Sets the Reply-To: header.

As I said I can’t make it work, the email address used to connect to my  
smtp server constantly over-writes or takes precedence over the reply\_to  
option. I tried setting the headers too, but still no luck.

---

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [February 24, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160/4 "2009-02-24T18:35:00Z")

</div>

Ah - what smtp server are you using

On Feb 24, 11:26 am, Fernando P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [February 25, 2009, 3:45am UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160/5 "2009-02-25T03:45:09Z")

</div>

> ## I use Citadel ([www.citadel.org](http://www.citadel.org)).

I would check with them to see why they are overwriting the Reply-to  
header.

---

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [March 3, 2009, 12:39am UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160/6 "2009-03-03T00:39:06Z")

</div>

Jeff Emminger wrote:

> > ## I use Citadel ([www.citadel.org](http://www.citadel.org)).
> 
> I would check with them to see why they are overwriting the Reply-to  
> header.

Thanks for putting me on the correct track, I have been able to solve my  
problem. Citadel was not formerly allowing me to set the reply\_to and  
from headers.

---

<div class="post-metadata">

**Author:** ![fipa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9e8a1a/32.png) [@fipa](https://www.ruby-forum.com/u/fipa)\
**Post date:** [February 24, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/unable-to-set-the-replay-to-in-actionmailer/161160/7 "2009-02-24T22:01:09Z")

</div>

Jeff Emminger wrote:

> Ah - what smtp server are you using
> 
> On Feb 24, 11:26ï¿½am, Fernando P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

I use Citadel ([www.citadel.org](http://www.citadel.org)).
