当填写 php 表单而不是执行 Print="Sorry an error occurred" 时发生错误时,我正在尝试向自己发送电子邮件
$error = "ERROR HAPPENED".$order."\r\n";
$error_email = mail($to, $subject, $error, $headers2);
$mail = @mail($email, $subject, $confirmation, $headers2);
if ($mail) {
header("Location: http://www.test.com" );
} else ($error_email);