discourse/lib/email
Martin Brennan 82cb67e67b
FIX: Canonical Message-ID was incorrect for some cases (#15701)
When creating a direct message to a group with group SMTP
set up, and adding another person to that message in the OP,
we send an email to the second person in the OP via the group_smtp
job. This in turn creates an IncomingEmail record to guard against
IMAP double sync.

The issue with this was that this IncomingEmail (which is essentialy
a placeholder/dummy one) was having its Message-ID used as the canonical
References Message-ID for subsequent emails sent out to user_private_message
recipients (such as members of the group), causing threading issues in
the mail client. The canonical <topic/ID@HOST> format should be used
instead for these cases.

This commit fixes the issue by only using the IncomingEmail for the
OP's Message-ID if the OP was created via our handle_mail email receiver
pipeline. It does not make sense to use it in other cases.
2022-02-03 10:36:32 +10:00
..
authentication_results.rb enqueue spam/dmarc failing emails instead of hiding (#8674) 2020-01-21 11:12:00 -05:00
build_email_helper.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
cleaner.rb FEATURE: Remove attachments and truncate raw field for incoming emails (#8253) 2019-10-30 16:54:35 +11:00
message_builder.rb FEATURE: Use group SMTP job and mailer instead of UserNotifications change (#13489) 2021-06-28 08:55:13 +10:00
message_id_service.rb FIX: Canonical Message-ID was incorrect for some cases (#15701) 2022-02-03 10:36:32 +10:00
processor.rb DEV: Add created_via column to IncomingEmail (#11751) 2021-01-20 13:22:41 +10:00
receiver.rb FIX: don't trigger `topic_created` event for reply posts via email. (#15485) 2022-01-10 13:54:10 +05:30
renderer.rb FIX: during concurrent emails generation renderer should not be reused 2019-10-10 08:50:48 +11:00
sender.rb FIX: References header leading to broken email threading (#15206) 2021-12-08 08:14:48 +10:00
styles.rb FIX: Correctly display GitHub code oneboxes (#14149) 2021-08-26 12:55:46 +03:00
validator.rb FIX: Parse address lists in embedded emails (#14514) 2021-10-06 15:07:29 +03:00