discourse/spec/fixtures/emails/reply_to_whitespaces.eml
Dan Ungureanu 74a9c0509b
FIX: Use addresses to compare email header (#14509)
Usually, when an email is received a user lookup is performed using the
email address found in the `From` header. When an email has an
`X-Original-From` header, if it is equal to `Reply-To` then it uses that
one instead. The comparison was sensitive to whitespaces and other
insignificant characters such as quotes because it reconstructed the
`From` header.

For the fixture added in this commit, it compared the reconstructed
`From` header `John Doe <johndoe@example.com>` with the `Reply-To`
header `"John Doe"    <johndoe@example.com>`.
2021-10-05 12:42:19 +03:00

13 lines
352 B
Plaintext

From: "'John Doe' via Forwarder" <team@bar.com>
To: "team@bar.com" <team@bar.com>
Subject: Greetings
Date: Wed, 01 Jan 2021 12:00:00 +0000
Message-ID: <TXULO4v6YU0TzeL2buFAJNU2MK21c7t4@example.com>
X-Original-Sender: johndoe@example.com
X-Original-From: "John Doe"
<johndoe@example.com>
Reply-To: "John Doe"
<johndoe@example.com>
Hello world!