# ActionMailer Reply-To Header

**URL:** <https://www.ruby-forum.com/t/actionmailer-reply-to-header/134210>\
**Category:** Rails\
**Created:** [April 8, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/actionmailer-reply-to-header/134210 "2008-04-08T21:59:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 8, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/actionmailer-reply-to-header/134210/1 "2008-04-08T21:59:12Z")

</div>

I am trying to include the persons name as well as email in the reply-  
to field of the email header. In the process, I’m seeing some weird  
behavior:

You can set the from address:  
@from = "Persons Name "

But if you use the same convention for reply-to:  
@headers[‘Reply-To’] = "Persons Name "

At some point the header gets parsed and the name is removed.

I’ve found that you can do :  
@headers[‘Reply-To’] = "‘Persons Name’ "

But I’m not sure that the single quotes are up to standard in the  
email header.

Thanks for the help!  
Tom

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 9, 2008, 12:27am UTC](https://www.ruby-forum.com/t/actionmailer-reply-to-header/134210/2 "2008-04-09T00:27:47Z")

</div>

"‘Persons Name’ " is valid. Was that not working for  
you?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 14, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/actionmailer-reply-to-header/134210/3 "2008-04-14T23:07:55Z")

</div>

I believe it will work, but it isn’t consistent. I was hoping someone  
understood how ActionMailer is parsing those fields…

On Apr 8, 6:26 pm, “removed\_email\_address@domain.invalid” \<ESPN3.DL-

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 30, 2008, 10:43pm UTC](https://www.ruby-forum.com/t/actionmailer-reply-to-header/134210/4 "2008-05-30T22:43:14Z")

</div>

Well, this has come back to bite me. Apparently, not all mail clients  
work with that format.

I guess the bottom line is how do you set the reply-to address?

@headers[“Reply-To”] = "Persons Name "

Will work but it will remove the person’s name. Shouldn’t it get  
parsed the same as:

@from = "Persons Name "

Thanks,  
Tom

On Apr 8, 6:26 pm, “removed\_email\_address@domain.invalid” \<ESPN3.DL-
