mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
add slightly more logs when skipping email notifications
This commit is contained in:
parent
2af587005b
commit
4ad5660615
2 changed files with 23 additions and 23 deletions
|
@ -23,7 +23,7 @@ module Email
|
|||
|
||||
def send
|
||||
return if SiteSetting.disable_emails
|
||||
return skip(I18n.t('email_log.message_blank')) if @message.blank?
|
||||
return skip(I18n.t('email_log.message_blank')) if @message.blank?
|
||||
return skip(I18n.t('email_log.message_to_blank')) if @message.to.blank?
|
||||
|
||||
if @message.text_part
|
||||
|
@ -135,7 +135,7 @@ module Email
|
|||
|
||||
def to_address
|
||||
@to_address ||= begin
|
||||
to = @message ? @message.to : nil
|
||||
to = @message.try(:to)
|
||||
to = to.first if Array === to
|
||||
to.presence || "no_email_found"
|
||||
end
|
||||
|
@ -167,7 +167,7 @@ module Email
|
|||
to_address: to_address,
|
||||
user_id: @user.try(:id),
|
||||
skipped: true,
|
||||
skipped_reason: reason
|
||||
skipped_reason: "[Sender] #{reason}"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue