Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class IndexController extends Zend_Controller_Action
- {
- public function init()
- {
- /* Initialize action controller here */
- }
- public function indexAction()
- {
- // action body
- $config = array('auth' => 'login',
- 'username' => 'zend***@gmail.com',
- 'password' => '***',
- 'ssl' => 'ssl',
- 'port' => 465
- );
- $transport = new Zend_Mail_Transport_Smtp('smtp.googlemail.com', $config);
- $mail = new Zend_Mail();
- $mail->setBodyText('This is the text of the mail.');
- $mail->setFrom('zend***@gmail.com', 'Some Sender');
- $mail->addTo('myemail@gmail.com', 'Some Recipient');
- $mail->setSubject('TestSubject');
- $mail->send($transport);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement