Hello everyone.
I have everything configured correctly except the final smtp configuration. I have created my Api in Google and validated in Oauth2 (attached screenshot), but when I click on Save changes I get an error, either with ssl://smtp.gamil.com and port 465, or with tls://smtp.gmail.com and port 587. I have the server mounted on IIS and Php 8.19 with all the necessary extensions enabled. I don't know what can cause this problem. Thank you very much for your help.