Answers for "swift_SmtpTransport with oauth2"

0

swift_SmtpTransport with oauth2

$Transport = new Swift_SmtpTransport('smtp.gmail.com',587,'tls');
$Transport->setAuthMode('login')
          ->setUsername('my-email-address')
          ->setPassword('my-password');

$Mailer = new Swift_Mailer($Transport);
// ... make a new message & send it
Posted by: Guest on July-27-2021
0

swift_SmtpTransport with oauth2

$access_token = 'ya29.GLv....'; 
$Transport = new Swift_SmtpTransport('smtp.gmail.com',587,'tls');
$Transport->setAuthMode('XOAUTH2')
          ->setUsername('my-email-address')
          ->setPassword($access_token);

$Mailer = new Swift_Mailer($Transport);
Posted by: Guest on July-27-2021

Code answers related to "swift_SmtpTransport with oauth2"

Browse Popular Code Answers by Language