Skip to content

Commit

Permalink
fix(oauth-smtp): Fixed authentication username for shared outlook SMT…
Browse files Browse the repository at this point in the history
…P accounts
  • Loading branch information
andris9 committed Jan 23, 2025
1 parent 1463506 commit c4ca913
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/email-client/base-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,10 @@ class BaseClient {
}
} else {
oauthCredentials = await this.loadOAuth2LoginCredentials(this.accountObject, accountData, ctx, target);
if (accountData.oauth2.auth.delegatedUser && target === 'smtp') {
// override SMTP username, do not use the shared user
oauthCredentials.oauth2User = accountData.oauth2.auth.user;
}
}

return oauthCredentials;
Expand Down
2 changes: 0 additions & 2 deletions lib/email-client/outlook-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2080,8 +2080,6 @@ class OutlookClient extends BaseClient {

path = [].concat(path || []).join('/');

console.log('RESOLVING FOLDER', { path, options });

let cachedListing = await this.getCachedMailboxListing();
let mailboxListing = cachedListing || (await this.getMailboxListing());

Expand Down

0 comments on commit c4ca913

Please sign in to comment.