@@ -30,6 +30,11 class Mailer < ActionMailer::Base | |||||
30 | set_language_if_valid(Setting.default_language) |
|
30 | set_language_if_valid(Setting.default_language) | |
31 | # Sends to all project members |
|
31 | # Sends to all project members | |
32 | @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact |
|
32 | @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact | |
|
33 | # Sends to author and assignee (even if they turned off mail notification) | |||
|
34 | @recipients << issue.author.mail | |||
|
35 | @recipients << issue.assigned_to.mail | |||
|
36 | @recipients.compact! | |||
|
37 | @recipients.uniq! | |||
33 | @from = Setting.mail_from |
|
38 | @from = Setting.mail_from | |
34 | @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" |
|
39 | @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" | |
35 | @body['issue'] = issue |
|
40 | @body['issue'] = issue | |
@@ -39,7 +44,12 class Mailer < ActionMailer::Base | |||||
39 | set_language_if_valid(Setting.default_language) |
|
44 | set_language_if_valid(Setting.default_language) | |
40 | # Sends to all project members |
|
45 | # Sends to all project members | |
41 | issue = journal.journalized |
|
46 | issue = journal.journalized | |
42 |
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification } |
|
47 | @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification } | |
|
48 | # Sends to author and assignee (even if they turned off mail notification) | |||
|
49 | @recipients << issue.author.mail | |||
|
50 | @recipients << issue.assigned_to.mail | |||
|
51 | @recipients.compact! | |||
|
52 | @recipients.uniq! | |||
43 | # Watchers in cc |
|
53 | # Watchers in cc | |
44 | @cc = issue.watcher_recipients - @recipients |
|
54 | @cc = issue.watcher_recipients - @recipients | |
45 | @from = Setting.mail_from |
|
55 | @from = Setting.mail_from |
General Comments 0
You need to be logged in to leave comments.
Login now