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: email@example.com' . "\r\n" . 'Reply-To: firstname.lastname@example.org' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); // if mail sent then do this...