40 |
40 |
'Issue-Id' => issue.id,
|
41 |
41 |
'Issue-Author' => issue.author.login
|
42 |
42 |
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
|
43 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", issue.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
43 |
44 |
message_id issue
|
44 |
45 |
recipients issue.recipients
|
45 |
46 |
cc(issue.watcher_recipients - @recipients)
|
... | ... | |
60 |
61 |
'Issue-Id' => issue.id,
|
61 |
62 |
'Issue-Author' => issue.author.login
|
62 |
63 |
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
|
64 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", issue.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
63 |
65 |
message_id journal
|
64 |
66 |
references issue
|
65 |
67 |
@author = journal.user
|
... | ... | |
94 |
96 |
# Mailer.deliver_document_added(document) => sends an email to the document's project recipients
|
95 |
97 |
def document_added(document)
|
96 |
98 |
redmine_headers 'Project' => document.project.identifier
|
|
99 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", document.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
97 |
100 |
recipients document.recipients
|
98 |
101 |
subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
|
99 |
102 |
body :document => document,
|
... | ... | |
125 |
128 |
recipients container.recipients
|
126 |
129 |
end
|
127 |
130 |
redmine_headers 'Project' => container.project.identifier
|
|
131 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", container.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
128 |
132 |
subject "[#{container.project.name}] #{l(:label_attachment_new)}"
|
129 |
133 |
body :attachments => attachments,
|
130 |
134 |
:added_to => added_to,
|
... | ... | |
139 |
143 |
# Mailer.deliver_news_added(news) => sends an email to the news' project recipients
|
140 |
144 |
def news_added(news)
|
141 |
145 |
redmine_headers 'Project' => news.project.identifier
|
|
146 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", news.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
142 |
147 |
message_id news
|
143 |
148 |
recipients news.recipients
|
144 |
149 |
subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}"
|
... | ... | |
155 |
160 |
def message_posted(message)
|
156 |
161 |
redmine_headers 'Project' => message.project.identifier,
|
157 |
162 |
'Topic-Id' => (message.parent_id || message.id)
|
|
163 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", message.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
158 |
164 |
message_id message
|
159 |
165 |
references message.parent unless message.parent.nil?
|
160 |
166 |
recipients(message.recipients)
|
... | ... | |
173 |
179 |
def wiki_content_added(wiki_content)
|
174 |
180 |
redmine_headers 'Project' => wiki_content.project.identifier,
|
175 |
181 |
'Wiki-Page-Id' => wiki_content.page.id
|
|
182 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", wiki_content.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
176 |
183 |
message_id wiki_content
|
177 |
184 |
recipients wiki_content.recipients
|
178 |
185 |
cc(wiki_content.page.wiki.watcher_recipients - recipients)
|
... | ... | |
190 |
197 |
def wiki_content_updated(wiki_content)
|
191 |
198 |
redmine_headers 'Project' => wiki_content.project.identifier,
|
192 |
199 |
'Wiki-Page-Id' => wiki_content.page.id
|
|
200 |
from Setting.mail_from_pattern.to_s.gsub("%%projectid%%", wiki_content.project.identifier) unless Setting.mail_from_pattern.to_s.empty?
|
193 |
201 |
message_id wiki_content
|
194 |
202 |
recipients wiki_content.recipients
|
195 |
203 |
cc(wiki_content.page.wiki.watcher_recipients + wiki_content.page.watcher_recipients - recipients)
|