Mail notification options restored (default is: issue_added and issue_updated).

Added mail notification when adding a news (disabled by default).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@728 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2007-09-14 15:30:46 +00:00
1 parent 1fa1f62018
commit 23264ec3eb
10 files changed
+65 -15

No files matched your search

+8
View File
@@ -90,6 +90,14 @@ class Mailer < ActionMailer::Base
@body['url'] = url
@body['added_to'] = added_to
end
def news_added(news)
set_language_if_valid(Setting.default_language)
@recipients = news.project.users.collect { |u| u.mail if u.mail_notification }.compact
@from = Setting.mail_from
@subject = "[#{news.project.name}] #{l(:label_news)}: #{news.title}"
@body['news'] = news
end
def lost_password(token)
set_language_if_valid(token.user.language)