📜  带有 oauth2 的 swift_SmtpTransport - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:36.633000             🧑  作者: Mango

代码示例2
$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