PHPMailer oauth2 refresh token and composer (not working)

Description of issue or problem I’m having:
I have exactly the same problem as outlined in this post: Not a single mail send from OJS as well as admin also not reset pwd

That post is now closed and therefore I can’t reply to it.

I have followed the instructions and installed composer (on my local machine, and ran it within the phpmailer directory (the one containing get_oauth_token.php), but composer returns an error.


Steps I took leading up to the issue:
I have created a secret and client ID and wanted to get a refresh token from get_oauth_token.php. This crashed due to not having /vendor/autoload.php installed.

I installed and ran “composer install” within the phpmailer directory but it failed.

What I tried to resolve the issue:
Searched forums, found some instructions but they appear not to work out of the box.

Application Version - e.g., OJS 3.1.2:

Need to check with your hosting provider sometime they are not provide full access or root access so it will not work