Closed ghost closed 4 years ago
index.js:156 connection.imap.closeBox(false).catch( ^ TypeError: Cannot read property 'catch' of undefined
According to https://github.com/chadxz/imap-simple/blob/master/lib/imapSimple.js#L104 it seemed that this function should return a Promise, but the error I saw above indicated otherwise.
Package version: "imap-simple": "^5.0.0"
"imap-simple": "^5.0.0"
Outdated example. One should be calling connection.closeBox() if they expect promise. connection.imap is the underlaying node-imap instance, which does not have promise based interface.
connection.closeBox()
connection.imap
node-imap
According to https://github.com/chadxz/imap-simple/blob/master/lib/imapSimple.js#L104 it seemed that this function should return a Promise, but the error I saw above indicated otherwise.
Package version:
"imap-simple": "^5.0.0"