cake3にて、Emailクラスを使ってメール送信を試みた際、postfixを停止させているにも関わらずExceptionをcatchすることが出来ないのですが、どうしてでしょうか?
$email = new Email('default'); try { $result = $email->to($email_address) ->subject(__('Register Mail')) ->send($sendUrl); // $result = Email::deliver($email_address, __('Register Mail'), $sendUrl, 'default'); var_dump($result); } catch (\Exception $e) { $this->Flash->error(__('Failed to send mail.')); $this->redirect(['action' => 'sendRegisterMail']); } return $this->redirect(['action' => 'completeSendMail']);
Cake PHP 3.3.13
回答2件
あなたの回答
tips
プレビュー