Include the email subject line in rejection messages

This change has a tradeoff.
It increases our backscatter vulnerability - the subject could have spammy content - but it's extremely valuable to the user to know exactly which message was rejected.
If you sent two at the same time, and only one was rejected, you would have no way of knowing which worked and which to resend without going to the website (which is what email-in is trying to avoid, kinda).
This commit is contained in:
riking
2014-07-17 10:04:02 -07:00
parent 1682f5d584
commit c8d322d1be
4 changed files with 15 additions and 21 deletions

View File

@@ -3,11 +3,12 @@ require_dependency 'email/message_builder'
class RejectionMailer < ActionMailer::Base
include Email::BuildEmailHelper
def send_rejection(from, body, to_address, template)
build_email(from, template: "system_messages.#{template}", source: body, destination: to_address)
def send_rejection(message_from, message_body, message_subject, forum_address, template)
build_email(message_from,
template: "system_messages.#{template}",
source: message_body,
former_title: message_subject,
destination: forum_address)
end
def send_trust_level(from, template)
build_email(from, template: 'email_reject_trust_level')
end
end