Class" smtpTransport"未找到

时间:2015-01-06 16:05:19

标签: php cakephp

我正在使用CakeEmail在我的网站上发送邮件,下面是我的配置文件信息

public $default = array( 
        'host' => 'smtpout.asia.secureserver.net', 
        'port' => 25, 
        'username' => 'xxxxxx',
        'password' => 'xxxxxx', 
        'transport' => 'smtp',
       // "tls"=>true
    );

它在我的本地计算机上工作正常但它在godaddy共享主机上给出了以下错误。

Class "smtpTransport" not found.

Error: An Internal Error Has Occurred.

Stack Trace

CORE/Cake/Network/Email/CakeEmail.php line 1265 → CakeEmail->transportClass()
CORE/Cake/Network/Email/CakeEmail.php line 1133 → CakeEmail->_applyConfig(string)
APP/Controller/AppController.php line 46 → CakeEmail->config(string)
APP/Controller/ServicesController.php line 48 → AppController->sendMail(string, string, string, string, array)
[internal function] → ServicesController->consultnow()
CORE/Cake/Controller/Controller.php line 490 → ReflectionMethod->invokeArgs(ServicesController, array)
CORE/Cake/Routing/Dispatcher.php line 191 → Controller->invokeAction(CakeRequest)
CORE/Cake/Routing/Dispatcher.php line 165 → Dispatcher->_invoke(ServicesController, CakeRequest)
APP/webroot/index.php line 108 → Dispatcher->dispatch(CakeRequest, CakeResponse)

由于

1 个答案:

答案 0 :(得分:4)

根据CakePhp的DOC,该课程为SmtpTransport而不是smtpTransport

Autoloader区分大小写

参考:http://api.cakephp.org/2.5/class-SmtpTransport.html