FIX: include site name in email reply error subject

This commit is contained in:
Arpit Jalan 2015-04-01 11:20:02 +05:30
parent 7774fdda2e
commit a80c742855
2 changed files with 13 additions and 12 deletions

View File

@ -70,6 +70,7 @@ module Jobs
message = Mail::Message.new(mail_string) message = Mail::Message.new(mail_string)
template_args[:former_title] = message.subject template_args[:former_title] = message.subject
template_args[:destination] = message.to template_args[:destination] = message.to
template_args[:site_name] = SiteSetting.title
client_message = RejectionMailer.send_rejection(message_template, message.from, template_args) client_message = RejectionMailer.send_rejection(message_template, message.from, template_args)
Email::Sender.new(client_message, message_template).send Email::Sender.new(client_message, message_template).send

View File

@ -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." text_body_template: "We're sorry, but your data export failed. Please check the logs or contact a staff member."
email_reject_trust_level: email_reject_trust_level:
subject_template: "Email issue -- Insufficient Trust Level" subject_template: "[%{site_name}] Email issue -- Insufficient Trust Level"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_reject_no_account:
subject_template: "Email issue -- Unknown Account" subject_template: "[%{site_name}] Email issue -- Unknown Account"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_reject_empty:
subject_template: "Email issue -- No Content" subject_template: "[%{site_name}] Email issue -- No Content"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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). 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: email_reject_parsing:
subject_template: "Email issue -- Content unrecognized" subject_template: "[%{site_name}] Email issue -- Content unrecognized"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_reject_post_error:
subject_template: "Email issue -- Posting error" subject_template: "[%{site_name}] Email issue -- Posting error"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_reject_post_error_specified:
subject_template: "Email issue -- Posting error" subject_template: "[%{site_name}] Email issue -- Posting error"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. If you can correct the problem, please try again.
email_reject_reply_key: email_reject_reply_key:
subject_template: "Email issue -- Unknown Reply Key" subject_template: "[%{site_name}] Email issue -- Unknown Reply Key"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_reject_destination:
subject_template: "Email issue -- Unknown To: Address" subject_template: "[%{site_name}] Email issue -- Unknown To: Address"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_reject_topic_not_found:
subject_template: "Email issue -- Topic Not Found" subject_template: "[%{site_name}] Email issue -- Topic Not Found"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_reject_topic_closed:
subject_template: "Email issue -- Topic Closed" subject_template: "[%{site_name}] Email issue -- Topic Closed"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. The topic is closed. If you believe this is in error, contact a staff member.
email_reject_auto_generated: email_reject_auto_generated:
subject_template: "Email issue -- Auto Generated Reply" subject_template: "[%{site_name}] Email issue -- Auto Generated Reply"
text_body_template: | text_body_template: |
We're sorry, but your email message to %{destination} (titled %{former_title}) didn't work. 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. 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: email_error_notification:
subject_template: "Email issue -- POP authentication error" subject_template: "[%{site_name}] Email issue -- POP authentication error"
text_body_template: | text_body_template: |
There has been an authentication error while polling mails from the POP server. There has been an authentication error while polling mails from the POP server.