Log info when sending an email notification.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3355 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a1a24483b5
commit
a0364deb6a
|
@ -340,9 +340,14 @@ class Mailer < ActionMailer::Base
|
|||
recipients.delete(@author.mail) if recipients
|
||||
cc.delete(@author.mail) if cc
|
||||
end
|
||||
|
||||
notified_users = [recipients, cc].flatten.compact.uniq
|
||||
# Rails would log recipients only, not cc and bcc
|
||||
mylogger.info "Sending email notification to: #{notified_users.join(', ')}" if mylogger
|
||||
|
||||
# Blind carbon copy recipients
|
||||
if Setting.bcc_recipients?
|
||||
bcc([recipients, cc].flatten.compact.uniq)
|
||||
bcc(notified_users)
|
||||
recipients []
|
||||
cc []
|
||||
end
|
||||
|
@ -393,6 +398,10 @@ class Mailer < ActionMailer::Base
|
|||
@references_objects ||= []
|
||||
@references_objects << object
|
||||
end
|
||||
|
||||
def mylogger
|
||||
RAILS_DEFAULT_LOGGER
|
||||
end
|
||||
end
|
||||
|
||||
# Patch TMail so that message_id is not overwritten
|
||||
|
|
Loading…
Reference in New Issue