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: 'message_type', value: submission.messageType ?? 'general' },
|
||||||
{ name: 'submission_id', value: submission.id },
|
{ 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,
|
text,
|
||||||
html,
|
html,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user