Created
June 26, 2012 15:21
-
-
Save lucasmezencio/2996400 to your computer and use it in GitHub Desktop.
Configure Gmail SMTP with Zend Framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); | |
->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