Cakephp电子邮件给出错误:"连接超时"

时间:2014-09-04 10:37:25

标签: email cakephp

我正在发送带有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,           
);

请告诉我,我错过了任何一条线路吗?

0 个答案:

没有答案