我正在发送带有CakePHP框架的电子邮件 以下是我在函数中添加的代码:
App::uses('CakeEmail', 'Network/Email');
$Email = new CakeEmail('gmail');
$Email->from(array(
ADMIN_EMAIL => 'kioui'
));
$Email->to('pankhiwalia@gmail.com');
$Email->subject('test');
$Email->emailFormat('text');
$p = $Email->send();
在Config/email.php
文件下我添加了以下smtp设置:
public $smtp = array(
'transport' => 'Smtp',
'from' => array(ADMIN_EMAIL => ADMIN_NAME),
'host' => 'ssl://localhost',
'username' => 'kiouiapp@kioui-apps.com',
'password' => 'Fr00Fr00',
'client' => null,
'log' => true,
'timeout' => '30',
'tls' => false,
'port' => 465,
);
请告诉我,我错过了任何一条线路吗?