I have a system in Yii2 that sends emails and has a basic configuration where user and password is used as a sender. What I need is to change that configuration to use the Google Oauth 2.0 protocol, I have searched and I don’t find much documentation about it.
I know it is necessary to use a client_id, secret_id and a refresh_token that I already have, but I don’t know how to configure my app
This is the configuration that I currently have on app/web.php
'mailer' => [
'class' => 'yiisymfonymailerMailer',
'useFileTransport' => false,
'transport' => [
'host' => 'smtp.gmail.com',
'username' => '[email protected]',
'password' => 'pasword',
'port' => '587',
'encryption' => 'tls',
]
],