emailjs / emailjs-imap-client

Low-level JS IMAP client for all your IMAP needs.
MIT License
553 stars 122 forks source link

can't deleteMessages #210

Closed andrelec1 closed 5 years ago

andrelec1 commented 5 years ago

I have a email account receive buntch of mail with a little file ... my goal, every 10 minutes, read all may, download the little file , remove the mail ...

PS: this.#client is my connected ImapClient...

i try

this.#client.deleteMessages('INBOX', mail.uid, { byUid: true }).then(() => {  
    jethro.warning('ImapClient', `Mail UID : ${mail.uid} - ${mail.uid} is delete.`);
});

and

this.#client.deleteMessages('INBOX', mail['#' ]).then(() => {
      jethro.warning('ImapClient', `Mail UID : ${mail.uid} is delete.`);
    });

but that doesn't work..., i have 5 random mail with the flag : deleted: 1 on my mailbox but mail still here .. i try to move mail to trash... but seem not working ... ( try moving mail to another folder , doesn't work either )


this.#client.moveMessages('INBOX', mail.uid, 'INBOX.eee', { byUid: true }).then(() => {
      jethro.warning('ImapClient', `Mail UID : ${mail.uid} is delete.`);
    });```

( same , try with 'byUid', and without ... try with 'INBOX.eee' / 'INBOX/eee', 'INBOX.Trash' INBOX/Trash')