I am calling a mail_it function within a registration page and want to create routine to check when the server barfs back an error that an email that was put in was bad. Code is as follows:
function mail_it($content, $subject, $email, $recipient) {
mail($recipient, $subject, $content, "From: $email\r\nReply-To: $email\r\nX-Mailer: DT_formmail");
}
Everything works great, except when a bad email is put into the recipient box. The server then barfs when trying to send it to that recipient.