0
내가 내 컨트롤러클래스를 찾을 수 없습니다 'cakeEmail'- cakephp2
App::uses('AppController', 'Controller');
App::uses('CakeEmail', 'Network/Email');
...
...
...
public function index() {
....
$Email = new cakeEmail('smtp');
$Email->template('MassMail')
->emailFormat('html')
->viewVars([
'content' => $content
])
->from(['[email protected]' => 'Forkom Jerman'])
->to($to)
->subject($subject)
->replyTo('[email protected]')
->transport('smtp');
if ($Email->send()) {
$this->Flash->set('Email Telah terkirim');
} else {
$this->Flash->set('Email tidak bisa terkirim');
}
}
}
및 이메일부터 1. 여기 입니다 조각의 요리 책 (1)을 다음하고 있지만 cakeMail으로 이메일을 보내려고이 eror을 얻었다. config 폴더에 PHP :
class EmailConfig {
public $smtp = array(
'transport' => 'Smtp',
'from' => '[email protected]',
'host' => 'send.one.com',
'port' => 465,
'username' => '*****@gmail.com',
'password' => '******',
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
);
}
내가 잘못 어디 있는지 말해주세요 감사합니다!
당신은이 방법으로 시도해 봤어 :'$ 이메일 = 새로운 CakeEmail ('SMTP를');'? – Bart