0
我想使用CakePHP的郵件系統,但我無法發送電子郵件,我得到以下錯誤:CakePHP的無法發送電子郵件
Fatal error: Class 'CakeEmail' not found in D:... on line 100
我有以下的在我的控制器定義:
App::uses('AppController', 'Controller','CakeEmail', 'Network/Email');
// In the controller:
public function search() {
$email = new CakeEmail();
$email->from(array('[email protected]' => 'Assetchase.co.za'));
$email->subject('result notification.');
foreach($emails as $value) {
$user = $this->User->find("first",array("fields" => array("username"),"conditions" => array("id" => $value)));
$email->to($user['User']['username']);
$email->send('A new notification, booyah!');
// Send an email with the username.
}
}