mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Do not add mailing list headers to group SMTP emails (#13431)
When we are emailing people from a group inbox, we are having a PM conversation with them, as a support account would. In this case mailing list headers do not make sense. It is not like a forum topic where you may have tens or hundreds of participants -- it is a conversation between the group and a small handful of people directly contacting the group, often just one person. The only header left in tact was List-Unsubsribe which is important for letting people opt out to notifications.
This commit is contained in:
@@ -366,6 +366,16 @@ describe Email::Sender do
|
||||
expect(email_log.user_id).to be_blank
|
||||
expect(email_log.smtp_group_id).to eq(group.id)
|
||||
end
|
||||
|
||||
it "does not add any of the mailing list headers" do
|
||||
TopicAllowedGroup.create(topic: post.topic, group: group)
|
||||
email_sender.send
|
||||
|
||||
expect(message.header['List-ID']).to eq(nil)
|
||||
expect(message.header['List-Post']).to eq(nil)
|
||||
expect(message.header['List-Archive']).to eq(nil)
|
||||
expect(message.header['Precedence']).to eq(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user