mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-09-20 15:26:03 +08:00
Do not break messages with long HTML content
This commit is contained in:
parent
6008fb26ed
commit
583e577b35
|
@ -34,7 +34,7 @@ module.exports = {
|
||||||
MAX_PLAINTEXT_CONTENT: 100 * 1024,
|
MAX_PLAINTEXT_CONTENT: 100 * 1024,
|
||||||
|
|
||||||
// how much HTML content to store before truncating. not indexed
|
// how much HTML content to store before truncating. not indexed
|
||||||
MAX_HTML_CONTENT: 300 * 1024,
|
MAX_HTML_CONTENT: 640 * 1024,
|
||||||
|
|
||||||
MAX_AUTOREPLY_INTERVAL: 4 * 3600 * 1000,
|
MAX_AUTOREPLY_INTERVAL: 4 * 3600 * 1000,
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,7 @@ class MessageHandler {
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
html = html.substr(0, htmlSize + Buffer.byteLength(html) - consts.MAX_HTML_CONTENT);
|
html = html.substr(0, consts.MAX_HTML_CONTENT);
|
||||||
htmlSize += Buffer.byteLength(html);
|
htmlSize += Buffer.byteLength(html);
|
||||||
return html;
|
return html;
|
||||||
})
|
})
|
||||||
|
@ -556,7 +556,7 @@ class MessageHandler {
|
||||||
modseq: messageData.modseq,
|
modseq: messageData.modseq,
|
||||||
unseen: messageData.unseen,
|
unseen: messageData.unseen,
|
||||||
idate: messageData.idate,
|
idate: messageData.idate,
|
||||||
thread: messageData.thread,
|
thread: messageData.thread
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.notifier.fire(mailboxData.user);
|
this.notifier.fire(mailboxData.user);
|
||||||
|
|
Loading…
Reference in a new issue