In Cake 1.3, MailComponent did what it should do. The new Cake Email class in 2.0 was disappointing .... No emails sent, no errors .... undefined documentation ...
I tried all possible options, tried it using SMTP, Mail () and Gmail, nothing happens. Hereby is my last attempt:
Controller Debugger:
App::uses('CakeEmail', 'Network/Email');
$email = new CakeEmail();
$email->template('contact_email')
->emailFormat('text')
->to('my@gmail.com')
->from('other@gmail.com')
->send();
Email.php configuration file:
class EmailConfig {
public $gmail = array(
'host' => 'ssl://smtp.gmail.com',
'port' => 465,
'username' => 'my@gmail.com',
'password' => '***',
'transport' => 'Smtp'
);
Someone can send a WORK code for an email class. Many thanks
source
share