diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-11-05 16:49:27 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-11-05 16:49:27 +0000 |
commit | 3628515b312c96d35fd1ec3a21b58ccfb3731a67 (patch) | |
tree | 497663aba7751e56505f7a64cc68b6d2961a9f77 /redmine/app/models/mailer.rb | |
parent | 51e0989c491972578d3f3bb241df8f7dbee4c1ea (diff) | |
download | redmine-3628515b312c96d35fd1ec3a21b58ccfb3731a67.tar.gz redmine-3628515b312c96d35fd1ec3a21b58ccfb3731a67.zip |
git-svn-id: http://redmine.rubyforge.org/svn/trunk@38 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'redmine/app/models/mailer.rb')
-rw-r--r-- | redmine/app/models/mailer.rb | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/redmine/app/models/mailer.rb b/redmine/app/models/mailer.rb index 755764dc0..fa19bf4da 100644 --- a/redmine/app/models/mailer.rb +++ b/redmine/app/models/mailer.rb @@ -20,30 +20,38 @@ class Mailer < ActionMailer::Base def issue_change_status(issue) # Sends to all project members @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification } - @from = 'redmine@somenet.foo' - @subject = "Issue ##{issue.id} has been updated" + @from = $RDM_MAIL_FROM + @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}"
@body['issue'] = issue
end
def issue_add(issue) # Sends to all project members @recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification } - @from = 'redmine@somenet.foo' - @subject = "Issue ##{issue.id} has been reported" + @from = $RDM_MAIL_FROM + @subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.status.name} - #{issue.subject}" @body['issue'] = issue
end
+ def issue_add_note(history)
+ # Sends to all project members
+ @recipients = history.issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
+ @from = $RDM_MAIL_FROM
+ @subject = "[#{history.issue.project.name} - #{history.issue.tracker.name} ##{history.issue.id}] #{history.issue.status.name} - #{history.issue.subject}"
+ @body['history'] = history
+ end
+
def lost_password(token)
@recipients = token.user.mail
- @from = 'redmine@somenet.foo'
- @subject = "redMine password"
+ @from = $RDM_MAIL_FROM
+ @subject = l(:mail_subject_lost_password)
@body['token'] = token
end def register(token)
@recipients = token.user.mail
- @from = 'redmine@somenet.foo'
- @subject = "redMine account activation"
+ @from = $RDM_MAIL_FROM
+ @subject = l(:mail_subject_register)
@body['token'] = token
end
end |