2011-09-15 18:56:20 +01:00
|
|
|
# coding: UTF-8
|
|
|
|
|
2011-03-10 21:48:15 +00:00
|
|
|
class UserMailer < ActionMailer::Base
|
2011-12-31 10:51:47 +00:00
|
|
|
default :from => APP_CONFIG['do-not-reply-email']
|
2011-03-10 21:48:15 +00:00
|
|
|
|
|
|
|
def new_user_notification(user)
|
|
|
|
@user = user
|
2011-12-26 15:48:57 +00:00
|
|
|
mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_user_notification", :project_name => APP_CONFIG['project_name'])) do |format|
|
|
|
|
format.html
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def new_comment_notification(comment, user)
|
|
|
|
@user = user
|
|
|
|
@comment = comment
|
|
|
|
mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_comment_notification")) do |format|
|
|
|
|
format.html
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-01-13 15:07:01 +00:00
|
|
|
def new_comment_reply_notification(comment, user)
|
|
|
|
@user = user
|
|
|
|
@comment = comment
|
|
|
|
mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_comment_reply_notification")) do |format|
|
|
|
|
format.html
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-12-26 15:48:57 +00:00
|
|
|
def new_issue_notification(issue, user)
|
|
|
|
@user = user
|
|
|
|
@issue = issue
|
|
|
|
mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_issue_notification")) do |format|
|
|
|
|
format.html
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def issue_assign_notification(issue, user)
|
|
|
|
@user = user
|
|
|
|
@issue = issue
|
|
|
|
mail(:to => user.email, :subject => I18n.t("notifications.subjects.issue_assign_notification")) do |format|
|
2011-03-31 13:21:43 +01:00
|
|
|
format.html
|
2011-03-30 23:11:37 +01:00
|
|
|
end
|
2011-03-10 21:48:15 +00:00
|
|
|
end
|
|
|
|
end
|