プロジェクト

全般

プロフィール

Vote #79915

完了

Remove redefinition of ActionMailer::LogSubscriber#deliver which is no longer necessary because of the removal of Setting.bcc_recipients

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
155
issue_org_id:
31035
author_id:
332
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

If the patch #30820 that drops "Blind carbon copy recipients (bcc)" setting is accepted, we can remove the workaround for #12090 that fixes the issue that email recipients are not logged when the setting is enabled, because emails will always be sent using To.


diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb
index e0559903b..a42b91e4c 100644
--- a/config/initializers/10-patches.rb
+++ b/config/initializers/10-patches.rb
@@ -122,24 +122,6 @@ end
 
 ActionMailer::Base.add_delivery_method :tmp_file, DeliveryMethods::TmpFile
 
-# Changes how sent emails are logged
-# Rails doesn't log cc and bcc which is misleading when using bcc only (#12090)
-module ActionMailer
-  class LogSubscriber < ActiveSupport::LogSubscriber
-    def deliver(event)
-      recipients = [:to, :cc, :bcc].inject(+"") do |s, header|
-        r = Array.wrap(event.payload[header])
-        if r.any?
-          s << "\n  #{header}: #{r.join(', ')}"
-        end
-        s
-      end
-      info("\nSent email \"#{event.payload[:subject]}\" (%1.fms)#{recipients}" % event.duration)
-      debug(event.payload[:mail])
-    end
-  end
-end
-
 module ActionController
   module MimeResponds
     class Collector

journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,12090,email recipients not written to action_mailer log if BCC recipients setting is checked
blocks,Closed,30820,Drop setting "Blind carbon copy recipients (bcc)"

Admin Redmine さんが3年以上前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン5.0.0_155 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0