Your Ad Here

Posted By

luglio7 on 10/12/10


Tagged

cakephp


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

bigfish
pytheas
stamba
mmcachran
vehler
hmvrulz


send mail with gmail (smtp)


 / Published in: PHP
 

  1. $this->Email->smtpOptions = array(
  2. 'port'=>'465',
  3. 'timeout'=>'30',
  4. 'auth' => true,
  5. 'host' => 'ssl://smtp.gmail.com',
  6. 'username'=>'youraccount@gmail.com',
  7. 'password'=>'yourpassword'
  8. );
  9.  
  10. $this->Email->to = 'test <test@gmail.com>'; // important: name <mailaddress>
  11. $this->Email->subject = "email di prova";
  12. $this->Email->delivery = 'smtp';
  13. $this->Email->send();

Report this snippet  

You need to login to post a comment.