無効なメール: Cakephp の「from@your_app_domain.com」
私はコントローラでこのコードを書きました:
public function remember_password()
{
if ($this->request->is('post')) {
$user = $this->User->findByEmail($this->request->data['User']['email']);
if (empty($user)) {
$this->Session->setFlash('This email does not exist in our database.', 'flash_fail');
$this->redirect(array('action' => 'login'));
}
$hash = $this->User->generateHashChangePassword();
$data = array(
'User' => array(
'id' => $user['User']['id'],
'hash_change_password' => $hash
)
);
$this->User->save($data);
$email = new CakeEmail();
$email->template('remember_password', 'default')
->config('gmail')
->emailFormat('html')
->subject(__('Remember password - ' . Configure::read('Application.name')))
->to($user['User']['email'])
->from(Configure::read('Application.from_email'))
->viewVars(array('hash' => $hash))
->send();
$this->Session->setFlash('Check your e-mail to continue the process of recovering password.', 'flash_success');
}
}
上記のエラーが発生します。前もって感謝します