Posted By

luglio7 on 10/12/10


Tagged

cakephp


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

bigfish
pytheas
stamba
mmcachran
vehler
hmvrulz
tux-world


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'=>'[email protected]',
  7. 'password'=>'yourpassword'
  8. );
  9.  
  10. $this->Email->to = 'test <[email protected]>'; // 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.