I'm running a contest where a user has to validate their email address. While the code works fine when I test it and the vast majority of voters have been able to successfully validate their email address, I get a number of folks who insist that the email never arrived and I have seen on, for example, bellsouth.net, some inconsistencies as far as the timeliness of the delivery.
All that to say, that I'm confident there's room for improvement, but it's exasperating when I can't duplicate the problem and / or have no idea why it will work for some, but not for others.
My code is below. Any suggestions are welcome and I do appreciate it.
$key = "qP9wXOx+Dk0iVCmUQDEkLCf5"
$digest = sha1($str, true);
$the_digest = base64_encode($digest);
$the_first_name = stripslashes($_POST['voter
$to = $voter_email;
$subject = "voter_validation";
$headers = 'MIME-Version: 1.0'. PHP_EOL;
$headers .= 'Content-type: text/html; charset=iso-8859-1'. PHP_EOL;
$headers .= 'FROM: email@example.com'.
$subject = "voter validation";
$message = " <BR> <BR>Hello
, $the_first_name !<P>To validate your email and to ensure that your votes count, click on the link below.";
$message .= "<P>http://www.countryshowdown.com/Chevron/songwriting_voter_validation.php?email=$voter_email&chk=$the_digest
<P>If you have any questions, you can contact you Bruce Gust, the Showdown webmaster by emailing him at firstname.lastname@example.org.
mail($to, $subject , $message, $headers);