My controller
App::uses('CakeEmail', 'Network/Email'); //before class begins
//function
public function contact(){
$email = new CakeEmail();
$email->config('smtp');
$email->from('[email protected]');
$email->to('[email protected]');
$email->subject('About');
$email->send('My message');
}
//Email.php in config folder
class EmailConfig {
public $smtp = array(
'transport' => 'Smtp',
'from' => '[email protected]',
'host' => 'smtp.gmail.com',
'port' => 465,
//'timeout' => 30,
'username' => '[email protected]',
'password' => '*****',
'client' => null,
'log' => false,
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
);
}
The error i get is
Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\myproject\lib\Cake\Network\CakeSocket.php on line 222
what do i need to change?
I even created the view file in Views/Users/contact.
Do i need to change the view file in View/Email folder?