Forum: Ruby on Rails ActionMailer Reply-To Header

Posted by TomRossi7 (Guest)
on 2008-04-08 21:59
(Received via mailing list)
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 <persons email>"

But if you use the same convention for reply-to:
@headers['Reply-To'] = "Persons Name <persons email>"

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

I've found that you can do :
@headers['Reply-To'] = "'Persons Name' <persons email>"

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

Thanks for the help!
Tom
Posted by ESPNDev@gmail.com (Guest)
on 2008-04-09 00:27
(Received via mailing list)
"'Persons Name' <persons email>" is valid. Was that not working for
you?
Posted by TomRossi7 (Guest)
on 2008-04-14 23:07
(Received via mailing list)
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, "ESPN...@gmail.com" <ESPN3.DL-
Posted by TomRossi7 (Guest)
on 2008-05-30 22:43
(Received via mailing list)
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 <persons email>"

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

@from = "Persons Name <persons email>"

Thanks,
Tom


On Apr 8, 6:26 pm, "ESPN...@gmail.com" <ESPN3.DL-
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.