@@ -27,11 +27,11 class Mailer < ActionMailer::Base | |||
|
27 | 27 | { :host => Setting.host_name, :protocol => Setting.protocol } |
|
28 | 28 | end |
|
29 | 29 | |
|
30 |
# Builds a |
|
|
30 | # Builds a Mail::Message object used to email recipients of the added issue. | |
|
31 | 31 | # |
|
32 | 32 | # Example: |
|
33 |
# issue_add(issue) => |
|
|
34 |
# Mailer. |
|
|
33 | # issue_add(issue) => Mail::Message object | |
|
34 | # Mailer.issue_add(issue).deliver => sends an email to issue recipients | |
|
35 | 35 | def issue_add(issue) |
|
36 | 36 | redmine_headers 'Project' => issue.project.identifier, |
|
37 | 37 | 'Issue-Id' => issue.id, |
@@ -48,11 +48,11 class Mailer < ActionMailer::Base | |||
|
48 | 48 | :subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" |
|
49 | 49 | end |
|
50 | 50 | |
|
51 |
# Builds a |
|
|
51 | # Builds a Mail::Message object used to email recipients of the edited issue. | |
|
52 | 52 | # |
|
53 | 53 | # Example: |
|
54 |
# issue_edit(journal) => |
|
|
55 |
# Mailer. |
|
|
54 | # issue_edit(journal) => Mail::Message object | |
|
55 | # Mailer.issue_edit(journal).deliver => sends an email to issue recipients | |
|
56 | 56 | def issue_edit(journal) |
|
57 | 57 | issue = journal.journalized.reload |
|
58 | 58 | redmine_headers 'Project' => issue.project.identifier, |
@@ -87,11 +87,11 class Mailer < ActionMailer::Base | |||
|
87 | 87 | :subject => l(:mail_subject_reminder, :count => issues.size, :days => days) |
|
88 | 88 | end |
|
89 | 89 | |
|
90 |
# Builds a |
|
|
90 | # Builds a Mail::Message object used to email users belonging to the added document's project. | |
|
91 | 91 | # |
|
92 | 92 | # Example: |
|
93 |
# document_added(document) => |
|
|
94 |
# Mailer.d |
|
|
93 | # document_added(document) => Mail::Message object | |
|
94 | # Mailer.document_added(document).deliver => sends an email to the document's project recipients | |
|
95 | 95 | def document_added(document) |
|
96 | 96 | redmine_headers 'Project' => document.project.identifier |
|
97 | 97 | @author = User.current |
@@ -101,11 +101,11 class Mailer < ActionMailer::Base | |||
|
101 | 101 | :subject => "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" |
|
102 | 102 | end |
|
103 | 103 | |
|
104 |
# Builds a |
|
|
104 | # Builds a Mail::Message object used to email recipients of a project when an attachements are added. | |
|
105 | 105 | # |
|
106 | 106 | # Example: |
|
107 |
# attachments_added(attachments) => |
|
|
108 |
# Mailer. |
|
|
107 | # attachments_added(attachments) => Mail::Message object | |
|
108 | # Mailer.attachments_added(attachments).deliver => sends an email to the project's recipients | |
|
109 | 109 | def attachments_added(attachments) |
|
110 | 110 | container = attachments.first.container |
|
111 | 111 | added_to = '' |
@@ -133,11 +133,11 class Mailer < ActionMailer::Base | |||
|
133 | 133 | :subject => "[#{container.project.name}] #{l(:label_attachment_new)}" |
|
134 | 134 | end |
|
135 | 135 | |
|
136 |
# Builds a |
|
|
136 | # Builds a Mail::Message object used to email recipients of a news' project when a news item is added. | |
|
137 | 137 | # |
|
138 | 138 | # Example: |
|
139 |
# news_added(news) => |
|
|
140 |
# Mailer. |
|
|
139 | # news_added(news) => Mail::Message object | |
|
140 | # Mailer.news_added(news).deliver => sends an email to the news' project recipients | |
|
141 | 141 | def news_added(news) |
|
142 | 142 | redmine_headers 'Project' => news.project.identifier |
|
143 | 143 | @author = news.author |
@@ -148,10 +148,10 class Mailer < ActionMailer::Base | |||
|
148 | 148 | :subject => "[#{news.project.name}] #{l(:label_news)}: #{news.title}" |
|
149 | 149 | end |
|
150 | 150 | |
|
151 |
# Builds a |
|
|
151 | # Builds a Mail::Message object used to email recipients of a news' project when a news comment is added. | |
|
152 | 152 | # |
|
153 | 153 | # Example: |
|
154 |
# news_comment_added(comment) => |
|
|
154 | # news_comment_added(comment) => Mail::Message object | |
|
155 | 155 | # Mailer.news_comment_added(comment) => sends an email to the news' project recipients |
|
156 | 156 | def news_comment_added(comment) |
|
157 | 157 | news = comment.commented |
@@ -166,11 +166,11 class Mailer < ActionMailer::Base | |||
|
166 | 166 | :subject => "Re: [#{news.project.name}] #{l(:label_news)}: #{news.title}" |
|
167 | 167 | end |
|
168 | 168 | |
|
169 |
# Builds a |
|
|
169 | # Builds a Mail::Message object used to email the recipients of the specified message that was posted. | |
|
170 | 170 | # |
|
171 | 171 | # Example: |
|
172 |
# message_posted(message) => |
|
|
173 |
# Mailer. |
|
|
172 | # message_posted(message) => Mail::Message object | |
|
173 | # Mailer.message_posted(message).deliver => sends an email to the recipients | |
|
174 | 174 | def message_posted(message) |
|
175 | 175 | redmine_headers 'Project' => message.project.identifier, |
|
176 | 176 | 'Topic-Id' => (message.parent_id || message.id) |
@@ -186,11 +186,11 class Mailer < ActionMailer::Base | |||
|
186 | 186 | :subject => "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}" |
|
187 | 187 | end |
|
188 | 188 | |
|
189 |
# Builds a |
|
|
189 | # Builds a Mail::Message object used to email the recipients of a project of the specified wiki content was added. | |
|
190 | 190 | # |
|
191 | 191 | # Example: |
|
192 |
# wiki_content_added(wiki_content) => |
|
|
193 |
# Mailer. |
|
|
192 | # wiki_content_added(wiki_content) => Mail::Message object | |
|
193 | # Mailer.wiki_content_added(wiki_content).deliver => sends an email to the project's recipients | |
|
194 | 194 | def wiki_content_added(wiki_content) |
|
195 | 195 | redmine_headers 'Project' => wiki_content.project.identifier, |
|
196 | 196 | 'Wiki-Page-Id' => wiki_content.page.id |
@@ -207,11 +207,11 class Mailer < ActionMailer::Base | |||
|
207 | 207 | :subject => "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :id => wiki_content.page.pretty_title)}" |
|
208 | 208 | end |
|
209 | 209 | |
|
210 |
# Builds a |
|
|
210 | # Builds a Mail::Message object used to email the recipients of a project of the specified wiki content was updated. | |
|
211 | 211 | # |
|
212 | 212 | # Example: |
|
213 |
# wiki_content_updated(wiki_content) => |
|
|
214 |
# Mailer. |
|
|
213 | # wiki_content_updated(wiki_content) => Mail::Message object | |
|
214 | # Mailer.wiki_content_updated(wiki_content).deliver => sends an email to the project's recipients | |
|
215 | 215 | def wiki_content_updated(wiki_content) |
|
216 | 216 | redmine_headers 'Project' => wiki_content.project.identifier, |
|
217 | 217 | 'Wiki-Page-Id' => wiki_content.page.id |
@@ -231,11 +231,11 class Mailer < ActionMailer::Base | |||
|
231 | 231 | :subject => "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_updated, :id => wiki_content.page.pretty_title)}" |
|
232 | 232 | end |
|
233 | 233 | |
|
234 |
# Builds a |
|
|
234 | # Builds a Mail::Message object used to email the specified user their account information. | |
|
235 | 235 | # |
|
236 | 236 | # Example: |
|
237 |
# account_information(user, password) => |
|
|
238 |
# Mailer. |
|
|
237 | # account_information(user, password) => Mail::Message object | |
|
238 | # Mailer.account_information(user, password).deliver => sends account information to the user | |
|
239 | 239 | def account_information(user, password) |
|
240 | 240 | set_language_if_valid user.language |
|
241 | 241 | @user = user |
@@ -245,11 +245,11 class Mailer < ActionMailer::Base | |||
|
245 | 245 | :subject => l(:mail_subject_register, Setting.app_title) |
|
246 | 246 | end |
|
247 | 247 | |
|
248 |
# Builds a |
|
|
248 | # Builds a Mail::Message object used to email all active administrators of an account activation request. | |
|
249 | 249 | # |
|
250 | 250 | # Example: |
|
251 |
# account_activation_request(user) => |
|
|
252 |
# Mailer. |
|
|
251 | # account_activation_request(user) => Mail::Message object | |
|
252 | # Mailer.account_activation_request(user).deliver => sends an email to all active administrators | |
|
253 | 253 | def account_activation_request(user) |
|
254 | 254 | # Send the email to all active administrators |
|
255 | 255 | recipients = User.active.find(:all, :conditions => {:admin => true}).collect { |u| u.mail }.compact |
@@ -261,11 +261,11 class Mailer < ActionMailer::Base | |||
|
261 | 261 | :subject => l(:mail_subject_account_activation_request, Setting.app_title) |
|
262 | 262 | end |
|
263 | 263 | |
|
264 |
# Builds a |
|
|
264 | # Builds a Mail::Message object used to email the specified user that their account was activated by an administrator. | |
|
265 | 265 | # |
|
266 | 266 | # Example: |
|
267 |
# account_activated(user) => |
|
|
268 |
# Mailer. |
|
|
267 | # account_activated(user) => Mail::Message object | |
|
268 | # Mailer.account_activated(user).deliver => sends an email to the registered user | |
|
269 | 269 | def account_activated(user) |
|
270 | 270 | set_language_if_valid user.language |
|
271 | 271 | @user = user |
General Comments 0
You need to be logged in to leave comments.
Login now