From a80c742855a9155f5a0f73b1eee2134c63da2ed0 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 1 Apr 2015 11:20:02 +0530 Subject: [PATCH] FIX: include site name in email reply error subject --- app/jobs/scheduled/poll_mailbox.rb | 1 + config/locales/server.en.yml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/jobs/scheduled/poll_mailbox.rb b/app/jobs/scheduled/poll_mailbox.rb index 6d6f708b615..6f43a6f34a9 100644 --- a/app/jobs/scheduled/poll_mailbox.rb +++ b/app/jobs/scheduled/poll_mailbox.rb @@ -70,6 +70,7 @@ module Jobs message = Mail::Message.new(mail_string) template_args[:former_title] = message.subject template_args[:destination] = message.to + template_args[:site_name] = SiteSetting.title client_message = RejectionMailer.send_rejection(message_template, message.from, template_args) Email::Sender.new(client_message, message_template).send diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index cac0c532a07..3a8af7a5ab4 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1596,21 +1596,21 @@ en: text_body_template: "We're sorry, but your data export failed. Please check the logs or contact a staff member." email_reject_trust_level: - subject_template: "Email issue -- Insufficient Trust Level" + subject_template: "[%{site_name}] Email issue -- Insufficient Trust Level" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. Your account does not have the required trust level to post new topics to this email address. If you believe this is in error, contact a staff member. email_reject_no_account: - subject_template: "Email issue -- Unknown Account" + subject_template: "[%{site_name}] Email issue -- Unknown Account" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. There is no known user account with this email address. Try sending from a different email address, or contact a staff member. email_reject_empty: - subject_template: "Email issue -- No Content" + subject_template: "[%{site_name}] Email issue -- No Content" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. @@ -1619,21 +1619,21 @@ en: If you're getting this and you _did_ include content, try again with HTML content included in your email (not just plain text only). email_reject_parsing: - subject_template: "Email issue -- Content unrecognized" + subject_template: "[%{site_name}] Email issue -- Content unrecognized" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. We couldn't find your reply in the provided email. **Make sure your reply is at the top of the email** -- we can't process inline replies. email_reject_post_error: - subject_template: "Email issue -- Posting error" + subject_template: "[%{site_name}] Email issue -- Posting error" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. Some possible causes are: complex formatting, message too large, message too small. Please try again, or post via the website if this continues. email_reject_post_error_specified: - subject_template: "Email issue -- Posting error" + subject_template: "[%{site_name}] Email issue -- Posting error" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. @@ -1644,42 +1644,42 @@ en: If you can correct the problem, please try again. email_reject_reply_key: - subject_template: "Email issue -- Unknown Reply Key" + subject_template: "[%{site_name}] Email issue -- Unknown Reply Key" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. The provided reply key is invalid or unknown, so we don't know what this email is in reply to. Contact a staff member. email_reject_destination: - subject_template: "Email issue -- Unknown To: Address" + subject_template: "[%{site_name}] Email issue -- Unknown To: Address" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. None of the destination addresses are recognized. Please make sure that the site address is in the To: line (not Cc: or Bcc:), and that you are sending to the correct email address provided by staff. email_reject_topic_not_found: - subject_template: "Email issue -- Topic Not Found" + subject_template: "[%{site_name}] Email issue -- Topic Not Found" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. The topic is not found, it may have been deleted. If you believe this is in error, contact a staff member. email_reject_topic_closed: - subject_template: "Email issue -- Topic Closed" + subject_template: "[%{site_name}] Email issue -- Topic Closed" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. The topic is closed. If you believe this is in error, contact a staff member. email_reject_auto_generated: - subject_template: "Email issue -- Auto Generated Reply" + subject_template: "[%{site_name}] Email issue -- Auto Generated Reply" text_body_template: | We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. Your email reply was auto generated, which we don't accept. If you believe this is in error, contact a staff member. email_error_notification: - subject_template: "Email issue -- POP authentication error" + subject_template: "[%{site_name}] Email issue -- POP authentication error" text_body_template: | There has been an authentication error while polling mails from the POP server.