Email notifications are now sent as Blind carbon copy by default. This can be changed in email notifications settings (new setting added).
Emission email address setting moved to the email notifications settings view. git-svn-id: http://redmine.rubyforge.org/svn/trunk@944 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+13
-4
@@ -129,11 +129,20 @@ class Mailer < ActionMailer::Base
|
||||
default_url_options[:protocol] = Setting.protocol
|
||||
end
|
||||
|
||||
# Overrides the create_mail method to remove the current user from the recipients and cc
|
||||
# if he doesn't want to receive notifications about what he does
|
||||
# Overrides the create_mail method
|
||||
def create_mail
|
||||
recipients.delete(User.current.mail) if recipients && User.current.pref[:no_self_notified]
|
||||
cc.delete(User.current.mail) if cc && User.current.pref[:no_self_notified]
|
||||
# Removes the current user from the recipients and cc
|
||||
# if he doesn't want to receive notifications about what he does
|
||||
if User.current.pref[:no_self_notified]
|
||||
recipients.delete(User.current.mail) if recipients
|
||||
cc.delete(User.current.mail) if cc
|
||||
end
|
||||
# Blind carbon copy recipients
|
||||
if Setting.bcc_recipients?
|
||||
bcc([recipients, cc].flatten.compact.uniq)
|
||||
recipients []
|
||||
cc []
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user