FEATURE: Add `before_email_send` event

Plugins can use it to customize the message (e.g. add header) before the email is sent.
This commit is contained in:
Gerhard Schlager 2020-06-18 18:36:14 +02:00
parent 5143309014
commit 2da6faf281
1 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,8 @@ module Email
email_log.message_id = @message.message_id
DiscourseEvent.trigger(:before_email_send, @message, @email_type)
begin
@message.deliver_now
rescue *SMTP_CLIENT_ERRORS => e