Add conversation threads and prepare 0.6.0

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-11-17 22:46:11 +02:00
co-authored by Copilot
parent 93ff651e9d
commit bb34eedb44
38 changed files with 532 additions and 23 deletions
+3
View File
@@ -1,6 +1,7 @@
const { randomUUID } = require('node:crypto');
const nodemailer = require('nodemailer');
const { normalizeOutgoingAttachments } = require('../mail-attachments.cjs');
const { messageIds } = require('../../conversation-threads.js');
function createMailSender({ smtpTransport, imapClient, findSentMailbox, createTransport = nodemailer.createTransport }) {
async function sendMailNow(account, message) {
@@ -19,6 +20,8 @@ function createMailSender({ smtpTransport, imapClient, findSentMailbox, createTr
subject: String(message.subject || '(no subject)').slice(0, 998),
text: signature ? `${body}${body.trim() ? '\n\n' : ''}${signature}`.slice(0, 505000) : body,
messageId: sentMessageId,
inReplyTo: messageIds(message.inReplyTo)[0] || undefined,
references: messageIds(message.references),
attachments: attachments.map(file => ({
filename: file.filename,
contentType: file.contentType,