mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -44,14 +44,7 @@ describe Jobs::PollMailbox do
|
||||
describe "processing email" do
|
||||
|
||||
let!(:receiver) { mock }
|
||||
let!(:email_string) { <<MAIL
|
||||
From: user@example.com
|
||||
To: reply+32@discourse.example.net
|
||||
Subject: Hi
|
||||
|
||||
Email As a String
|
||||
MAIL
|
||||
}
|
||||
let!(:email_string) { fixture_file("emails/valid_incoming.eml") }
|
||||
let!(:email) { mock }
|
||||
|
||||
before do
|
||||
@@ -82,7 +75,7 @@ MAIL
|
||||
sender_object = mock
|
||||
|
||||
RejectionMailer.expects(:send_rejection).with(
|
||||
message.from, message.body, message.to, :email_reject_trust_level
|
||||
message.from, message.body, message.subject, message.to, :email_reject_trust_level
|
||||
).returns(client_message)
|
||||
Email::Sender.expects(:new).with(client_message, :email_reject_trust_level).returns(sender_object)
|
||||
sender_object.expects(:send)
|
||||
|
Reference in New Issue
Block a user