Thread admin replies to original email via In-Reply-To/References headers
When replying to an inbound email that has a messageId, the outgoing Resend payload now includes In-Reply-To and References headers so the reply threads correctly in Gmail and other email clients. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -494,7 +494,13 @@ export function register(app) {
|
||||
{ name: 'message_type', value: submission.messageType ?? 'general' },
|
||||
{ name: 'submission_id', value: submission.id },
|
||||
],
|
||||
headers: { 'X-Contact-Submission-Id': submission.id },
|
||||
headers: {
|
||||
'X-Contact-Submission-Id': submission.id,
|
||||
...(submission.messageId ? {
|
||||
'In-Reply-To': submission.messageId,
|
||||
'References': submission.messageId,
|
||||
} : {}),
|
||||
},
|
||||
text,
|
||||
html,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user