imapflow 1.0.111 → 1.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/imap-flow.js +11 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lib/imap-flow.js
CHANGED
|
@@ -268,6 +268,8 @@ class ImapFlow extends EventEmitter {
|
|
|
268
268
|
this.currentLock = false;
|
|
269
269
|
this.locks = [];
|
|
270
270
|
|
|
271
|
+
this.idRequested = false;
|
|
272
|
+
|
|
271
273
|
this.maxIdleTime = this.options.maxIdleTime || false;
|
|
272
274
|
|
|
273
275
|
this.disableBinary = !!this.options.disableBinary;
|
|
@@ -613,7 +615,10 @@ class ImapFlow extends EventEmitter {
|
|
|
613
615
|
|
|
614
616
|
async startSession() {
|
|
615
617
|
await this.run('CAPABILITY');
|
|
616
|
-
|
|
618
|
+
|
|
619
|
+
if (this.capabilities.has('ID')) {
|
|
620
|
+
this.idRequested = await this.run('ID', this.clientInfo);
|
|
621
|
+
}
|
|
617
622
|
|
|
618
623
|
// try to use STARTTLS is possible
|
|
619
624
|
if (!this.secureConnection) {
|
|
@@ -626,6 +631,11 @@ class ImapFlow extends EventEmitter {
|
|
|
626
631
|
return await this.logout();
|
|
627
632
|
}
|
|
628
633
|
|
|
634
|
+
if (!this.idRequested && this.capabilities.has('ID')) {
|
|
635
|
+
// re-request ID after LOGIN
|
|
636
|
+
this.idRequested = await this.run('ID', this.clientInfo);
|
|
637
|
+
}
|
|
638
|
+
|
|
629
639
|
// Make sure we have namespace set. This should also throw if Exchange actually failed authentication
|
|
630
640
|
let nsResponse = await this.run('NAMESPACE');
|
|
631
641
|
if (nsResponse && nsResponse.error && nsResponse.status === 'BAD' && /User is authenticated but not connected/i.test(nsResponse.text)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imapflow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.112",
|
|
4
4
|
"description": "IMAP Client for Node",
|
|
5
5
|
"main": "./lib/imap-flow.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/eslint-plugin": "7.19.1",
|
|
32
32
|
"@babel/plugin-syntax-class-properties": "7.12.13",
|
|
33
33
|
"@babel/preset-env": "7.19.4",
|
|
34
|
-
"@types/node": "18.
|
|
34
|
+
"@types/node": "18.11.0",
|
|
35
35
|
"braintree-jsdoc-template": "3.3.0",
|
|
36
36
|
"eslint": "8.25.0",
|
|
37
37
|
"eslint-config-nodemailer": "1.2.0",
|