2012-07-03 18:59:50 +02:00
|
|
|
class EmailReply < ActionMailer::Base
|
2013-06-30 08:29:51 +02:00
|
|
|
default :from => "#{Rails.application.name} " <<
|
|
|
|
"<nobody@#{Rails.application.domain}>"
|
2012-07-03 18:59:50 +02:00
|
|
|
|
|
|
|
def reply(comment, user)
|
2013-02-14 01:50:51 +01:00
|
|
|
@comment = comment
|
2012-07-03 18:59:50 +02:00
|
|
|
@user = user
|
|
|
|
|
2013-06-30 08:29:51 +02:00
|
|
|
mail(
|
|
|
|
:to => user.email,
|
2017-02-08 08:14:56 +01:00
|
|
|
:subject => I18n.t('mailers.email_reply.replysubject', :appname => "#{Rails.application.name}", :author => "#{comment.user.username}", :story => "#{comment.story.title}")
|
2013-06-30 08:29:51 +02:00
|
|
|
)
|
2012-07-03 18:59:50 +02:00
|
|
|
end
|
2012-09-10 19:40:33 +02:00
|
|
|
|
|
|
|
def mention(comment, user)
|
2013-02-14 01:50:51 +01:00
|
|
|
@comment = comment
|
2012-09-10 19:40:33 +02:00
|
|
|
@user = user
|
|
|
|
|
2013-06-30 08:29:51 +02:00
|
|
|
mail(
|
|
|
|
:to => user.email,
|
2017-02-08 08:14:56 +01:00
|
|
|
:subject => I18n.t('mailers.email_reply.mentionsubject', :appname => "#{Rails.application.name}", :author => "#{comment.user.username}", :story => "#{comment.story.title}")
|
2013-06-30 08:29:51 +02:00
|
|
|
)
|
2012-09-10 19:40:33 +02:00
|
|
|
end
|
2012-07-03 18:59:50 +02:00
|
|
|
end
|