我有一个带有用于发送消息的操作的控制器,如下所示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 仍然无法找到它们,而且我不知道为什么会发生这种情况。谁能指出我正确的方向?