From 8d1dbe1448c139fb7854fb7a838a41cec5077191 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Tue, 11 Dec 2018 15:43:36 +0100 Subject: [PATCH] Remove mail workaround after upgrade to 2.7 --- app/mailers/mailer.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/mailers/mailer.rb b/app/mailers/mailer.rb index 918832b1..2ce6403c 100644 --- a/app/mailers/mailer.rb +++ b/app/mailers/mailer.rb @@ -112,9 +112,7 @@ class Mailer < ActionMailer::Base reply_email_domain = FoodsoftConfig[:reply_email_domain] if reply_email_domain && !args[:return_path] && args[:to].is_a?(String) - #TODO: Remove workaround for https://github.com/mikel/mail/issues/39 after next mail release - ascii_to = args[:to].encode('ASCII', invalid: :replace, undef: :replace, replace: '_') - address = Mail::Parsers::AddressListsParser.new.parse(ascii_to).addresses.first + address = Mail::Parsers::AddressListsParser.parse(args[:to]).addresses.first args[:return_path] = "<#{FoodsoftConfig.scope}.bounce+#{address.local}=#{address.domain}@#{reply_email_domain}>" end