Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2.  
  3. class IndexController extends Zend_Controller_Action
  4. {
  5.  
  6. public function init()
  7. {
  8. /* Initialize action controller here */
  9. }
  10.  
  11. public function indexAction()
  12. {
  13. // action body
  14.  
  15. $config = array('auth' => 'login',
  16. 'username' => 'zend***@gmail.com',
  17. 'password' => '***',
  18. 'ssl' => 'ssl',
  19. 'port' => 465
  20. );
  21.  
  22. $transport = new Zend_Mail_Transport_Smtp('smtp.googlemail.com', $config);
  23.  
  24. $mail = new Zend_Mail();
  25. $mail->setBodyText('This is the text of the mail.');
  26. $mail->setFrom('zend***@gmail.com', 'Some Sender');
  27. $mail->addTo('myemail@gmail.com', 'Some Recipient');
  28. $mail->setSubject('TestSubject');
  29. $mail->send($transport);
  30.  
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement