Add conversation threads and prepare 0.6.0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -82,6 +82,20 @@ test('reports Sent-copy failures without retrying a message accepted by SMTP', a
|
||||
assert.equal(calls.appended.length, 0);
|
||||
});
|
||||
|
||||
test('preserves reply headers in the SMTP message and Sent copy', async () => {
|
||||
const { sendMailNow, calls } = makeSender();
|
||||
await sendMailNow({ email: 'sender@example.com' }, {
|
||||
to: 'recipient@example.com',
|
||||
inReplyTo: '<parent@example.test>',
|
||||
references: '<root@example.test> <parent@example.test>'
|
||||
});
|
||||
assert.equal(calls.smtp[0].inReplyTo, '<parent@example.test>');
|
||||
assert.deepEqual(calls.smtp[0].references, ['<root@example.test>', '<parent@example.test>']);
|
||||
const saved = JSON.parse(calls.appended[0].content.toString());
|
||||
assert.equal(saved.inReplyTo, calls.smtp[0].inReplyTo);
|
||||
assert.deepEqual(saved.references, calls.smtp[0].references);
|
||||
});
|
||||
|
||||
test('closes SMTP transport and reports send failures', async () => {
|
||||
const { sendMailNow, calls } = makeSender({ smtpFails: true });
|
||||
await assert.rejects(
|
||||
|
||||
Reference in New Issue
Block a user