email.php:
class EmailConfig {
public $smtp = array(
'transport' => 'Smtp',
'from' => array('[email protected]' => 'Matheus'),
'host' => 'smtp.gmail.com',
'port' => 587,
'timeout' => 30,
'username' => '[email protected]',
'password' => '*********',
'client' => null,
'log' => false,
'charset' => 'utf-8',
'headerCharset' => 'utf-8',
'tls' => 1,
);
}
Error:
Connection refused Error: An Internal Error Has Occurred. Stack Trace CORE / Cake / Network / Email / SmtpTransport.php line 154 → CakeSocket-> Connect () CORE / Cake / Network / Email / SmtpTransport.php line 95 → SmtpTransport- > _connect () CORE / Cake / Network / Email / CakeEmail.php line 1161 → SmtpTransport-> send (CakeEmail) APP / Controller / PagesController.php line 58 → CakeEmail-> send () [internal function] → PagesController-> home () CORE / Cake / Controller / Controller.php line 490 → ReflectionMethod-> InvokeArgs (PagesController, array) CORE / Cake / Routing / Dispatcher.php line 193 → Controller-> invokeAction (CakeRequest) CORE / Cake / Routing / Dispatcher.php line 167 → Dispatcher-> _invoke (PagesController, CakeRequest) APP / webroot / index.php line 108 → Dispatcher-> dispatch (CakeRequest, CakeResponse)