-
Notifications
You must be signed in to change notification settings - Fork 109
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
phpmailer token #213
Comments
The two usual reasons for authentication failure are bad token and wrong scope:
|
Hi
Hi, |
If you decode the access token with e.g. jwt.ms (you might need to debase64 decode the token first using https://www.base64decode.org/ ), please let us have the AUD claim. To see the access token, enable SMTP debugging using (in your PHPMailer script) $this->mail->SMTPDebug = SMTP::DEBUG_LOWLEVEL; It will be displayed as a long character string just before your authentication fails, Note that you cannot decode a refresh token |
Hello is there someone making it works with the auth token and phpmailer?
I tried to use the refrehed token but phpmailer return CLIENT: 535 5.7.3 Authentication unsuccessful
Using graph api is great but i struggle with phpmailer.
$mail->setOAuth(
new OAuth(
[
'provider' => $provider,
'clientId' => $clientId,
'clientSecret' => $clientSecret,
'refreshToken' => $refreshToken,
'userName' => $email,
]
)
);
i also tried to set url of the api and version without more success
$provider->urlAPI = 'https://graph.microsoft.com/';
$provider->API_VERSION = '1.0';
Any help is welcome,
Thanks
The text was updated successfully, but these errors were encountered: