Use the email address of the foodcoop as default for Reply-To

This commit is contained in:
Patrick Gansterer 2017-10-02 19:06:08 +02:00
parent e4b1280952
commit 09548574cb

View file

@ -89,6 +89,10 @@ class Mailer < ActionMailer::Base
args[k] = "#{show_user user} <#{user.email}>" if user.is_a? User
end
if contact_email = FoodsoftConfig[:contact][:email]
args[:reply_to] ||= "#{FoodsoftConfig[:name]} <#{contact_email}>"
end
reply_email_domain = FoodsoftConfig[:reply_email_domain]
if reply_email_domain && !args[:return_path]
address = Mail::Parsers::AddressListsParser.new.parse(args[:to]).addresses.first