summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/mailer.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index 62d5c1635..bd4b6b7ea 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -30,6 +30,11 @@ class Mailer < ActionMailer::Base
set_language_if_valid(Setting.default_language)
# Sends to all project members
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
+ # Sends to author and assignee (even if they turned off mail notification)
+ @recipients << issue.author.mail
+ @recipients << issue.assigned_to.mail
+ @recipients.compact!
+ @recipients.uniq!
@from = Setting.mail_from
@subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
@body['issue'] = issue
@@ -39,7 +44,12 @@ class Mailer < ActionMailer::Base
set_language_if_valid(Setting.default_language)
# Sends to all project members
issue = journal.journalized
- @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
+ @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
+ # Sends to author and assignee (even if they turned off mail notification)
+ @recipients << issue.author.mail
+ @recipients << issue.assigned_to.mail
+ @recipients.compact!
+ @recipients.uniq!
# Watchers in cc
@cc = issue.watcher_recipients - @recipients
@from = Setting.mail_from