From 09548574cb3c1edee846eec841392a804fbeef6b Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Mon, 2 Oct 2017 19:06:08 +0200 Subject: [PATCH] Use the email address of the foodcoop as default for Reply-To --- app/mailers/mailer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/mailers/mailer.rb b/app/mailers/mailer.rb index 8936d308..8182d0e2 100644 --- a/app/mailers/mailer.rb +++ b/app/mailers/mailer.rb @@ -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