Merge pull request #10097 from colinux/fix-email-event-with-invalid-to-fields
Tech: pas d'erreur EmailEvent lorsque le message ne peut pas avoir plusieurs destinataires
This commit is contained in:
commit
a8a23f55a6
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class EmailEvent < ApplicationRecord
|
|||
|
||||
class << self
|
||||
def create_from_message!(message, status:)
|
||||
to = message.to || ["unset"] # no recipients when error occurs *before* setting to: in the mailer
|
||||
to = message.to_addrs || ["unset"] # no recipients when error occurs *before* setting to: in the mailer
|
||||
|
||||
to.each do |recipient|
|
||||
EmailEvent.create!(
|
||||
|
|
Loading…
Reference in a new issue