Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent Cross-Configuration Issues in EWS Services When Using ntlmAuthXhrApi #444

Open
miguelcr1982 opened this issue Oct 3, 2024 · 1 comment

Comments

@miguelcr1982
Copy link

I am using the ews-javascript-api library to send and receive emails through EWS in a Node.js project. I have two service instances, one for sending and another for receiving, using different email accounts.

I expect each service to maintain its own authentication configurations and not interfere with each other. However, occasionally, the send service uses the credentials of the receive account.

// Code for the send service
ews_send.ConfigurationApi.ConfigureXHR(
new ews_send.ntlmAuthXhrApi(
this.configService.get('EMAIL_USER_REPLY'),
this.configService.get('EMAIL_PASSWORD_REPLY')
)
);

// Code for the receive service
ews_receive.ConfigurationApi.ConfigureXHR(
new ews_receive.ntlmAuthXhrApi(
this.configService.get('EMAIL_USER_RECEIVES'),
this.configService.get('EMAIL_PASSWORD_RECEIVES')
)
);

Steps to Reproduce the Issue:

Set up two different email accounts for sending and receiving.
Call ConfigureXHR for the send service.
Call ConfigureXHR for the receive service.
Perform sending and receiving operations simultaneously.
Occasionally, observe that the send service's credentials cross over with the receive service's credentials.

Environment:

Node.js version: 20.17.0
ews-javascript-api version: 0.15.3

@gautamsi
Copy link
Owner

gautamsi commented Oct 8, 2024

you should be able to swap out the instance per Service by setting property directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants