mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -209,6 +209,8 @@ module Email
|
|||||||
|
|
||||||
email_log.message_id = @message.message_id
|
email_log.message_id = @message.message_id
|
||||||
|
|
||||||
|
DiscourseEvent.trigger(:before_email_send, @message, @email_type)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@message.deliver_now
|
@message.deliver_now
|
||||||
rescue *SMTP_CLIENT_ERRORS => e
|
rescue *SMTP_CLIENT_ERRORS => e
|
||||||
|
|||||||
Reference in New Issue
Block a user