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.
ghost r. (Guest)
on 2007-06-30 17: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='removed_email_address@domain.invalid',..it is not 
working...how to put reply
to.If anyone knows help me
Shai R. (Guest)
on 2007-07-01 17:18
Shiva K. 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='removed_email_address@domain.invalid',..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       "removed_email_address@domain.invalid"
     subject    "New account information"
     body       :account => recipient

     headers    'Reply-to' => 'removed_email_address@domain.invalid'

   end
 end

HTH ..
ghost r. (Guest)
on 2007-07-02 09:47
Thanks shai
  Its working now.Thanks for ur help.





Shai R. wrote:
> Shiva K. 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='removed_email_address@domain.invalid',..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       "removed_email_address@domain.invalid"
>      subject    "New account information"
>      body       :account => recipient
>
>      headers    'Reply-to' => 'removed_email_address@domain.invalid'
>
>    end
>  end
>
> HTH ..
This topic is locked and can not be replied to.