Avoid unpredictable behaviour on weird `undisclosed recipients:;` signal

IMAP does not return the bcc field cleanly, in fact, node-imap and by extension imap-simple wont return a valid bcc (or cc for that matter) at all.
Generally, you can only view those with the "envelope" attribute of a mail, but those are empty. Only clean option would be to somehow accesss and work with the rfc822 spec of `Original-Recipient`.
main
ClaraCrazy 2024-12-03 07:54:27 +01:00
parent f2e6923953
commit e99a8b55e0
No known key found for this signature in database
GPG Key ID: EBBC896ACB497011
2 changed files with 4 additions and 1 deletions

View File

@ -347,6 +347,7 @@ class ImapService extends EventEmitter {
async _getMailHeaders(uids) {
const fetchOptions = {
envelope: true,
bodies: ['HEADER.FIELDS (FROM TO SUBJECT DATE)'],
struct: false
}

View File

@ -27,8 +27,10 @@ class MailRepository {
}
add(to, mailSummary) {
if (to !== 'undefined') {
this.mailSummaries.set(to.toLowerCase(), mailSummary)
}
}
removeUid(uid, address) {
if (!this.config.email.examples.uids.includes(parseInt(uid))) {