mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2025-07-01 22:47:09 +02:00
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`.
This commit is contained in:
parent
f2e6923953
commit
e99a8b55e0
2 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue