Skip to content

Instantly share code, notes, and snippets.

@lucasmezencio
Created June 26, 2012 15:21
Show Gist options
  • Save lucasmezencio/2996400 to your computer and use it in GitHub Desktop.
Save lucasmezencio/2996400 to your computer and use it in GitHub Desktop.
Configure Gmail SMTP with Zend Framework
<?php
$config = array(
'ssl' => 'tls',
'port' => 587,
'auth' => 'login',
'username' => '[email protected]',
'password' => 'myPassword'
);
$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config);
$mail = new Zend_Mail();
$mail
->setFrom('[email protected]', 'From')
->setSubject('Subject')
->addTo('[email protected]')
->send($transport);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment