Regarding mail in ruby on rails


#1

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


#2

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 …


#3

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 …