Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

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);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+9 =