I am trying to send an email to myself when an error happens from filling out the php form instead of doing Print="Sorry an error happened"
$error = "ERROR HAPPENED".$order."
";
$error_email = mail($to, $subject, $error, $headers2);
$mail = @mail($email, $subject, $confirmation, $headers2);
if ($mail) {
header("Location: http://www.test.com" );
} else ($error_email);