Skip to content

A platform for community discussion. Free, open, simple.

DEV: Add `after_email_send` app event (#20178)

natiz9c30ae93b3f1
diff --git a/lib/email/sender.rb b/lib/email/sender.rb
index bdbc312b9b8..0f62d07bc95 100644
--- a/lib/email/sender.rb
+++ b/lib/email/sender.rb
@@ -294,6 +294,8 @@ module Email
return skip(SkippedEmailLog.reason_types[:custom], custom_reason: e.message)
end
+ DiscourseEvent.trigger(:after_email_send, @message, @email_type)
+
email_log.save!
email_log
end