Project

General

Profile

Patch #2406 » app_models_mailer.rb.diff

Kihyun Yun, 2008-12-29 06:19

View differences:

app/models/mailer.rb (working copy)
'Issue-Author' => issue.author.login
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
recipients issue.recipients
# ddumbugie
from issue.author.mail if issue.author
cc(issue.watcher_recipients - @recipients)
subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}"
body :issue => issue,
......
'Issue-Author' => issue.author.login
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
recipients issue.recipients
# ddumbugie
from journal.user.mail if journal.user
# Watchers in cc
cc(issue.watcher_recipients - @recipients)
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] "
......
def document_added(document)
redmine_headers 'Project' => document.project.identifier
recipients document.project.recipients
# ddumbugie
from document.attachments.first.author.mail if document.attachments.length > 1
subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
# added_to = ''
# added_to_url = ''
#
# if document.attachments
# added_to_url = url_for(:controller => 'documents', :action => 'show', :id => document)
# added_to = "#{l(:label_document)}: #{document.title}"
# end
body :document => document,
:document_url => url_for(:controller => 'documents', :action => 'show', :id => document)
#,
# :attachments => document.attachments,
# :added_to => added_to,
# :added_to_url => added_to_url
end
def attachments_added(attachments)
# ddumbugie
from attachments.first.author.mail if attachments.first.author
container = attachments.first.container
added_to = ''
added_to_url = ''
......
end
def news_added(news)
# ddumbugie
from news.author.mail if news.author
redmine_headers 'Project' => news.project.identifier
recipients news.project.recipients
subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}"
......
end
def message_posted(message, recipients)
# ddumbugie
from message.author.mail if message.author
redmine_headers 'Project' => message.project.identifier,
'Topic-Id' => (message.parent_id || message.id)
recipients(recipients)
(1-1/2)