diff --git a/app/models/miq_report/notification.rb b/app/models/miq_report/notification.rb index de5f1ba80f6..cbc8f9ab219 100644 --- a/app/models/miq_report/notification.rb +++ b/app/models/miq_report/notification.rb @@ -43,34 +43,16 @@ def notify_user_of_report(run_on, result, options) end end - # Avoid ActionMailer bug where the email headers get corrupted when the total length in bytes of all the recipients exceeds approx 150 bytes. - # When this happens, the addresses on the end spill over into the headers and cause the content and mime information to be ignored. - # - # Split recipient list into groups whose total length in bytes is around 100 bytes or the configured limit - cut_off = ::Settings.smtp.recipient_address_byte_limit - sub_group = [] - grouped_tos = to.uniq.inject([]) do |g, t| - sub_group << t - if sub_group.join.length >= cut_off || to.index(t) == (to.length - 1) - g << sub_group - sub_group = [] - end - g - end - # - begin - grouped_tos.each do |group_of_tos| - _log.info("Queuing email user: [#{user.name}] report results: [#{result.name}] to: #{group_of_tos.inspect}") - options = { - :to => group_of_tos, - :from => from, - :subject => subject, - :body => body, - :attachment => attachments, - } - GenericMailer.deliver_queue(:generic_notification, options) - end + _log.info("Queuing email user: [#{user.name}] report results: [#{result.name}] to: #{to.inspect}") + options = { + :to => to, + :from => from, + :subject => subject, + :body => body, + :attachment => attachments, + } + GenericMailer.deliver_queue(:generic_notification, options) rescue => err _log.error("Queuing email user: [#{user.name}] report results: [#{result.name}] failed with error: [#{err.class.name}] [#{err}]") end diff --git a/config/settings.yml b/config/settings.yml index 94e42dac913..02ce0168038 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1049,7 +1049,6 @@ :host: localhost :password: '' :port: '25' - :recipient_address_byte_limit: 100 :user_name: evmadmin :snapshots: :create_free_percent: 100