次のように、メッセージを送信するために使用QuickContacts
するアクションを持つコントローラーがあります。add()
CakeEmail
$Email = new CakeEmail();
$Email->from(array('noreply@xyz' => 'xyz'));
$Email->to(($this->isBranded) ? $this->brandedAccount['BrandedAccount']['contact_us_email'] : EMAIL_TO_MAIL_ADDRESS);
$Email->subject(EMAIL_QUICK_CONTACTS_SUBJECT);
$Email->emailFormat('html')->template('add', 'default');
$Email->message($this->request->data);
$Email->send();
メールを送信しようとすると、ビュー ファイルが存在しないことを示すエラーが表示されます。
Missing View
Error: The view for QuickContactsController::add() was not found.
Confirm you have created the file: Emails/html/add.ctp in one of the following paths:
/var/www/html/mysite/app/View/Themed/Xyz/Emails/html/add.ctp
これらのファイルが存在することは確かに確認できますが、何らかの理由で CakePHP はまだそれらを見つけることができず、なぜこれが起こっているのかわかりません。誰かが私を正しい方向に向けることができますか?