zendframework/Component_ZendMail — pull request #1 by rodnaph (2014-01-18 19:48:10+00:00)
Title: adds XOAuth2 (ie. Gmail) SMTP authentication

Example usage:

```php
use Zend\Mail;

$email = ''; // from email
$accessToken = ''; // valid access token

$mail = new Mail\Message();
$mail->setBody('some body text');
$mail->setFrom($email, 'Some Sender');
$mail->addTo("person@example.com", 'Some Person);
$mail->setSubject('Test sending by SMTP via Gmail');

$options = new Mail\Transport\SmtpOptions(
array(
'host' => 'smtp.gmail.com',
'port' => 587,
'connection_class' => 'xoauth2',
'connection_config' => array(
'ssl' => 'tls',
'email' => $email,
'accessToken' => $accessToken
)
)
);

$transport = new Mail\Transport\Smtp();
$transport->setOptions($options);
$transport->send($mail);
```