rack_mailer icon indicating copy to clipboard operation
rack_mailer copied to clipboard

Add reply_to option

Open tmaier opened this issue 11 years ago • 1 comments

Amazon SNS does not allow to set an arbitrary from address. It must be confirmed and validated.

But I would like to simply hit 'reply' to answer someone who wrote me on my contact form. So I would like to provide the users mail address in the reply_to option

tmaier avatar Oct 08 '13 19:10 tmaier

Should be pretty easy. Need a patch that adds reply_to to the list of delegated fields. Once you have that you should be able to do:

match '/mail_to' => Rack::Mailer.new {
  to '[email protected]'
  from '[email protected]'
  reply_to '[email protected]'
}

You may also want to adjust the deliver method to also automatically assign a param to reply_to just like "from" is done if not already hard-coded a value. This will allow the form to set the reply-to header.

If you want to put together a patch that follows this basic outline I'll happily commit it and release a new gem version.

eric1234 avatar Oct 08 '13 20:10 eric1234