$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 587, 'tls')
->setAuthMode('XOAUTH2')
->setUsername('YOUR_EMAIL_ADDRESS')
->setPassword('YOUR_ACCESS_TOKEN');
显示文件
Open project: HaliteChallenge/Halite
Method | Description | |
---|---|---|
authenticate ( Swift_Transport_SmtpAgent $agent, string $email, string $token ) : boolean | Try to authenticate the user with $email and $token. | |
getAuthKeyword ( ) : string | Get the name of the AUTH mechanism this Authenticator handles. |
Method | Description | |
---|---|---|
constructXOAuth2Params ( $email, $token ) | Construct the auth parameter. |
protected constructXOAuth2Params ( $email, $token ) |
public getAuthKeyword ( ) : string | ||
return | string |