Hey there folks, I''m sure there is a stupidly easy answer for this, but I can''t seem to find it. I''m building a site and I want a way for one user to contact another. Simple enough. The problem lies in the fact I want the email to ''come from'' the user, and not from my system. In my ActionMailer class if I do the following: @from = "#{from_user.display_name} <notifier@mydomain.com>" it works just fine. But I really want is: @from = "#{from_user.display_name} <bob@bobsdomain.com>" If I do that though, the email never gets delivered. So I guess my question is can someone tell me how to make this work correctly? Of if I can''t get this to work, is there a way to set a ''reply-to'' address so that when the user clicks reply in their email it goes to ''bob@bobsdomain.com'' and not to my notifier address? Thanks in advance for the help. -- Posted via http://www.ruby-forum.com/.
Cloves Carneiro Jr
2006-Mar-17 21:34 UTC
[Rails] Re: How do I use ''reply-to'' with Action Mailer
Hi Mark You should be able to send the email using the second option you described. Probably, the email server you''re using is setup to only send emails from your domain, check the server logs to see why the email is not delivered. You can set the reply-to header like this: @headers[''Reply-to''] = from_user.reply_address Cheers, Cloves Carneiro Jr http://www.ccjr.name Mark Bates wrote:> Hey there folks, I''m sure there is a stupidly easy answer for this, but > I can''t seem to find it. I''m building a site and I want a way for one > user to contact another. Simple enough. The problem lies in the fact I > want the email to ''come from'' the user, and not from my system. > > In my ActionMailer class if I do the following: > @from = "#{from_user.display_name} <notifier@mydomain.com>" > > it works just fine. But I really want is: > @from = "#{from_user.display_name} <bob@bobsdomain.com>" > > If I do that though, the email never gets delivered. > > So I guess my question is can someone tell me how to make this work > correctly? Of if I can''t get this to work, is there a way to set a > ''reply-to'' address so that when the user clicks reply in their email it > goes to ''bob@bobsdomain.com'' and not to my notifier address? > > Thanks in advance for the help.-- Posted via http://www.ruby-forum.com/.
Thanks Cloves. That was exactly what I was looking for. -Mark Cloves Carneiro Jr wrote:> Hi Mark > > You should be able to send the email using the second option you > described. Probably, the email server you''re using is setup to only send > emails from your domain, check the server logs to see why the email is > not delivered. > > You can set the reply-to header like this: > @headers[''Reply-to''] = from_user.reply_address > > Cheers, > > Cloves Carneiro Jr > http://www.ccjr.name >-- Posted via http://www.ruby-forum.com/.