Forum: Ruby on Rails regarding mail in ruby on rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9b78a514221abd006719e9746ad15c6e?d=identicon&s=25 ghost rider (shiva)
on 2007-06-30 15:23
Hi all,
   I am using action mailer to send mail,in that i want one option
called reply_to

if i put @reply_to='mes@dig.com',..it is not working...how to put reply
to.If anyone knows help me
4c3acdc3d93f54cc7a7281780ec8a4ee?d=identicon&s=25 Shai Rosenfeld (shai)
on 2007-07-01 15:18
Shiva Kumaran 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='mes@dig.com',..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

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       "system@example.com"
     subject    "New account information"
     body       :account => recipient

     headers    'Reply-to' => 'me@digg.com'

   end
 end

HTH ..
9b78a514221abd006719e9746ad15c6e?d=identicon&s=25 ghost rider (shiva)
on 2007-07-02 07:47
Thanks shai
  Its working now.Thanks for ur help.





Shai Rosenfeld wrote:
> Shiva Kumaran 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='mes@dig.com',..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
>
> 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       "system@example.com"
>      subject    "New account information"
>      body       :account => recipient
>
>      headers    'Reply-to' => 'me@digg.com'
>
>    end
>  end
>
> HTH ..
This topic is locked and can not be replied to.