You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple mailbox, the auth method of these mailbox are different. (basic auth, NTLMv2 )
I can use this API (ews-javascript-api@0.9.0-dev.4, ews-javascript-api-auth@1.2.0) to monitor the mailbox as below cases:
multiple basic auth mailbox
single NTLMv2 mailbox
Here is my source code to create the service.
for loop mailBox start===>
var ews = require('ews-javascript-api');
ews.EwsLogging.DebugLogEnabled = false;
var service = new ews.ExchangeService(ews.ExchangeVersion.Exchange2013);
var ewsAuth = require("./lib/ews-javascript-api-auth-ntlmv2/src/ntlmAuthXhrApi");
var xhrHelper = new ewsAuth.ntlmAuthXhrApi(mailBox.AccountAddress, mailBox.AccountPassword);
ews.ConfigurationApi.ConfigureXHR(xhrHelper);
service.Credentials = new ews.ExchangeCredentials(mailBox.AccountAddress, mailBox.AccountPassword);
service.Url = new ews.Uri(config.emailServer[mailBox.EmailServer]);
//subscribe streaming notification
.........
<===== loop end
When I try to monitor multiple NTLMv2 mailbox, it will throw an error. (Unhandled rejection Error: Invalid message signature)
I have check the source code, "ews.ConfigurationApi.ConfigureXHR" method is static. It only store the latest xhrHelper.
I found a workaround to handle this issue. Call "ews.ConfigurationApi.ConfigureXHR" method first, then call the bind method to retrieve the folder and email message.
I have multiple mailbox, the auth method of these mailbox are different. (basic auth, NTLMv2 )
I can use this API (ews-javascript-api@0.9.0-dev.4, ews-javascript-api-auth@1.2.0) to monitor the mailbox as below cases:
Here is my source code to create the service.
When I try to monitor multiple NTLMv2 mailbox, it will throw an error. (Unhandled rejection Error: Invalid message signature)
I have check the source code, "ews.ConfigurationApi.ConfigureXHR" method is static. It only store the latest xhrHelper.
I found a workaround to handle this issue. Call "ews.ConfigurationApi.ConfigureXHR" method first, then call the bind method to retrieve the folder and email message.
But I have a concern on concurrent receive email case.
Do you have any suggestion to handle this case? Thanks
The text was updated successfully, but these errors were encountered: