Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/259.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 蛋糕电子邮件不起作用_Php_Email_Cakephp_Cakephp 2.0 - Fatal编程技术网

Php 蛋糕电子邮件不起作用

Php 蛋糕电子邮件不起作用,php,email,cakephp,cakephp-2.0,Php,Email,Cakephp,Cakephp 2.0,蛋糕电子邮件不起作用 这是密码 app/config/email.php public $default = array( 'transport' => 'Mail', 'from' => 'abcd@gmail.com', //'charset' => 'utf-8', //'headerCharset' => 'utf-8', ); 和应用程序内/控制器/用户控制器 email = new CakeEmail();

蛋糕电子邮件不起作用

这是密码 app/config/email.php

public $default = array(
    'transport' => 'Mail',
    'from' => 'abcd@gmail.com',
    //'charset' => 'utf-8',
    //'headerCharset' => 'utf-8',
);
和应用程序内/控制器/用户控制器

email = new CakeEmail();
                $email->template('activate_your_account', 'default')
                        ->config('smtp')
                        ->emailFormat('html')
                        ->subject(__('Account Verification - ' . Configure::read('Application.name')))
                        ->to($user)
                        ->from(Configure::read('Application.from_email'))
                        ->viewVars(array('hash' => $hash, 'id' => $id))
                        ->send();
当我运行此命令时,会出现类似于
的错误,出现内部错误
。请帮帮我


编辑:现在我已解决此错误,谢谢您需要配置SMTP服务器。有关详细信息,请参见本页:


您的示例显示没有邮件服务器配置

您需要配置SMTP服务器。有关详细信息,请参见本页:

您的示例没有显示邮件服务器配置