diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index f6ebe3cec..1a41b04ce 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -141,8 +141,9 @@ class UserNotifications < ActionMailer::Base locals: { context_posts: context_posts, post: @post } ) + template = "user_notifications.user_#{notification_type}" if @post.topic.private_message? - opts[:subject_prefix] = "[#{I18n.t('private_message_abbrev')}] " + template << "_pm" end email_opts = { @@ -155,10 +156,9 @@ class UserNotifications < ActionMailer::Base username: username, add_unsubscribe_link: true, allow_reply_by_email: opts[:allow_reply_by_email], - template: "user_notifications.user_#{notification_type}", + template: template, html_override: html, - style: :notification, - subject_prefix: opts[:subject_prefix] || '' + style: :notification } # If we have a display name, change the from address diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 72329052d..07c574e9f 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1183,6 +1183,16 @@ en: --- %{respond_instructions} + user_posted_pm: + subject_template: "[%{site_name}] [PM] %{topic_title}" + text_body_template: | + %{message} + + %{context} + + --- + %{respond_instructions} + digest: why: "Here's a brief summary of the discussion on %{site_link} since we last saw you on %{last_seen_at}." subject_template: "[%{site_name}] Forum Activity for %{date}"