What is the best way to test an email has been sent when using php mail?
I need to add a mysql update, but I need to test that the email has definitely been sent.
Is it good enough to put the below code into an IF block?
$to = $user_email; $subject = 'A reminder from TNT'; $message = $info_msg; $headers = 'From: firstname.lastname@example.org' . "\r\n" . 'Reply-To: email@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); // if mail sent then do this...