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
parent
f2e6923953
commit
e99a8b55e0
|
@ -347,6 +347,7 @@ class ImapService extends EventEmitter {
|
||||||
|
|
||||||
async _getMailHeaders(uids) {
|
async _getMailHeaders(uids) {
|
||||||
const fetchOptions = {
|
const fetchOptions = {
|
||||||
|
envelope: true,
|
||||||
bodies: ['HEADER.FIELDS (FROM TO SUBJECT DATE)'],
|
bodies: ['HEADER.FIELDS (FROM TO SUBJECT DATE)'],
|
||||||
struct: false
|
struct: false
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,9 @@ class MailRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
add(to, mailSummary) {
|
add(to, mailSummary) {
|
||||||
this.mailSummaries.set(to.toLowerCase(), mailSummary)
|
if (to !== 'undefined') {
|
||||||
|
this.mailSummaries.set(to.toLowerCase(), mailSummary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
removeUid(uid, address) {
|
removeUid(uid, address) {
|
||||||
|
|
Loading…
Reference in New Issue