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:
Jean-Philippe Lang
2007-12-02 13:52:16 +00:00
parent aebcfb1eda
commit bc060b31ae
25 changed files with 51 additions and 16 deletions
+13 -4
View File
@@ -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