feat: ms graph api mail service#1507
Open
gnyiri wants to merge 24 commits into
Open
Conversation
…serOfficeProject/user-office-core into feat_ms_graph_api_mail_service
…ffice-core into feat_ms_graph_api_mail_service
…serOfficeProject/user-office-core into feat_ms_graph_api_mail_service
| } | ||
|
|
||
| protected isTokenExpired(): boolean { | ||
| if (!this.authToken?.expiresOn) { |
Contributor
There was a problem hiding this comment.
bug (maybe): I think this should return 'true'? If the field is missing then intuitively the token should be considered as expired... or?
| }); | ||
| } | ||
|
|
||
| protected createTransport(): NodeMailerTransportOptions | any { |
Contributor
There was a problem hiding this comment.
suggestion: do we need to have 'any' here? I think we can just remove it.
| return this.authToken.accessToken; | ||
| } | ||
|
|
||
| this.authToken = await this.msalClient.acquireTokenByClientCredential({ |
Contributor
There was a problem hiding this comment.
question: do you know what happens to the previous issued token, is that invalidated? The reason I'm asking is lets say there are two invocations of the function. both will await the credential, and once complete will update the class variable. If the second requiest invalidates the first requeests token then there could be a small race condition chance which will result usage of the token that is not valid.
added 2 commits
May 26, 2026 16:39
…serOfficeProject/user-office-core into feat_ms_graph_api_mail_service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add new MS Graph API based mail service to replace SMTP mail service.
Motivation and Context
At ELI, the SMTP mail service will be deprecated soon.
How Has This Been Tested
Manual + backend tests.
Fixes
n/a
Changes
Add MSGraphMailService class.
Depends on
n/a
Tests included/Docs Updated?