diff options
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r-- | app/models/mailer.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index b3ed16fc2..925d46ea7 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -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) |