Add conversation threads and prepare 0.6.0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user