Basic usage First of all, you should ensure the class is loaded using App::uses(): App::uses('CakeEmail', 'Network/Email'); Using CakeEmail is similar to using EmailComponent. But instead of using attributes you use methods. Example: $Email = new CakeEmail(); $Email->from(array('me@example.com' => 'My Site')); $Email->to('you@example.com'); $Email->subject('About'); $Email->send('My message'); To enable the transport, add the following information to your Config/email.php: You can configure SSL SMTP servers such as Gmail. To do so, prefix the host with 'ssl://' and configure the port value accordingly. Example: class EmailConfig { public $gmail = array( 'host' => 'ssl://smtp.gmail.com', 'port' => 465, 'username' => 'my@gmail.com', 'password' => 'secret', 'transport' =...
Coding Cheatsheets - Learn web development code and tutorials for Software developers which will helps you in project. Get help on JavaScript, PHP, XML, and more.