我正在使用 zend 框架 2.1.5,我想使用自定义电子邮件模板发送电子邮件。这是我的代码
$view = $this->getServiceLocator()->get('Zend\View\Renderer\RendererInterface');
$viewModel = new \Zend\View\Model\ViewModel();
$template = 'forgot_password.phtml';
$viewModel->setTemplate($template)
->setVariables(array('data' => $data));
$content = $view->render($viewModel);
收到错误Zend\View\Renderer\PhpRenderer::render: Unable to render template "forgot_password.phtml"; resolver could not resolve to a file