Page 1 of 1

Modern Authentification

Posted: Tue Apr 08, 2025 9:18 am
by stefanpape
Does anyone know how to program sending emails with Modern Authentication (OAuth 2.0) using PureBasic? For example, Exchange Online no longer accepts SMTPS. As far as I know, you can currently disable OAuth 2.0 in Exchange, but some users don't want that.

Thank you in advance for your help.

Re: Modern Authentification

Posted: Tue Apr 08, 2025 9:21 am
by Fred
For this you need to send a bearer token, which is not yet supported by PB:

https://curl.se/libcurl/c/CURLOPT_XOAUTH2_BEARER.html

Re: Modern Authentification

Posted: Tue Apr 08, 2025 9:26 am
by Fred
And a nice post here showing how to do it: https://www.purebasic.fr/english/viewtopic.php?t=82540