Remove mail workaround after upgrade to 2.7
This commit is contained in:
parent
71fd6f2a24
commit
8d1dbe1448
1 changed files with 1 additions and 3 deletions
|
@ -112,9 +112,7 @@ class Mailer < ActionMailer::Base
|
||||||
|
|
||||||
reply_email_domain = FoodsoftConfig[:reply_email_domain]
|
reply_email_domain = FoodsoftConfig[:reply_email_domain]
|
||||||
if reply_email_domain && !args[:return_path] && args[:to].is_a?(String)
|
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
|
address = Mail::Parsers::AddressListsParser.parse(args[:to]).addresses.first
|
||||||
ascii_to = args[:to].encode('ASCII', invalid: :replace, undef: :replace, replace: '_')
|
|
||||||
address = Mail::Parsers::AddressListsParser.new.parse(ascii_to).addresses.first
|
|
||||||
args[:return_path] = "<#{FoodsoftConfig.scope}.bounce+#{address.local}=#{address.domain}@#{reply_email_domain}>"
|
args[:return_path] = "<#{FoodsoftConfig.scope}.bounce+#{address.local}=#{address.domain}@#{reply_email_domain}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue