Class: ForumNotificationMailer
- Inherits:
-
DmCore::SiteMailer
- Object
- DmCore::SiteMailer
- ForumNotificationMailer
- Defined in:
- app/mailers/forum_notification_mailer.rb
Instance Method Summary collapse
-
#follower_notification(user, topic, comment_list) ⇒ Object
——————————————————————————.
Instance Method Details
#follower_notification(user, topic, comment_list) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/mailers/forum_notification_mailer.rb', line 8 def follower_notification(user, topic, comment_list) account = topic.account @subject = "Commets: #{topic.title}" @recipients = user.email @topic = topic @comment_list = comment_list @topic_link = dm_forum.forum_forum_topic_url(topic.forum.slug, topic.slug, locale: I18n.locale) @forum_link = dm_forum.forum_show_url(topic.forum.slug, locale: I18n.locale) headers = { "Return-Path" => account.preferred_smtp_from_email } mail( from: account.preferred_smtp_from_email, reply_to: account.preferred_smtp_from_email, to: @recipients, subject: @subject, theme: account.account_prefix) do |format| format.text { render "layouts/email_templates/forum_notification.text.erb" } format.html { render "layouts/email_templates/forum_notification.html.erb" } end end |