customcomputer Posted October 9, 2007 Share Posted October 9, 2007 I'm running a simple Form script and certain e-mail addresses will receive the e-mails instantly and others will not, and I've waited days for them. Yahoo addresses work great, but everything else is a no go. I'm assuming the script is correct since it sends at least some e-mail, but maybe I'm missing something? Our hosting server is using PHP Version 4.3.2. Anybody have any ideas? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Contact Script</title> </head> <body> <?php // get posted data into local variables $EmailTo = "[email protected]"; $Subject = "Web Contact"; $Name = Trim(stripslashes($_POST['Name'])); $City = Trim(stripslashes($_POST['City'])); $State = Trim(stripslashes($_POST['State'])); $Email = Trim(stripslashes($_POST['Email'])); $Message = Trim(stripslashes($_POST['Message'])); // quick validation $validationOK=true; if (Trim($Email)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=index-6.html\">"; exit; } // email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "City: "; $Body .= $City; $Body .= "\n"; $Body .= "State: "; $Body .= $State; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Message: "; $Body .= $Message; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$Email>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=index-6.htm\">"; } ?> </body> </html> My form scipt is pretty basic as well: <form METHOD="POST" ACTION="cont.php"> <table class="auto"> <tr> <td style="padding-right:4px; padding-left:32px;"> Enter your name:<br /> <div class="form"><input name="Name" type="text" value=""></div> <p>Your City: </p> <div class="form"> <input name="City" type="text" value="" style='width:100px;'></div> <p> Your State:</p> <div class="form"><input name="State" style='width:30px'></div> <p>Enter your e-mail:<br /></p> <div class="form"><input type="text" value="" name="Email"></div> Enter your message:<br /> <textarea name="Message" cols="20" rows="10"></textarea> </td> </tr> </table> <div style="margin-left:34px; margin-top:25px;"><input type="submit" name="submit" value="Submit"></div> </form> Link to comment https://forums.phpfreaks.com/topic/72464-some-e-mail-addresses-not-working/ Share on other sites More sharing options...
MadTechie Posted October 9, 2007 Share Posted October 9, 2007 could try $success = mail($EmailTo, $Subject, $Body, "From: <$Email>"); to $success = mail($EmailTo, $Subject, $Body, "From: $Email"); Link to comment https://forums.phpfreaks.com/topic/72464-some-e-mail-addresses-not-working/#findComment-365387 Share on other sites More sharing options...
customcomputer Posted October 9, 2007 Author Share Posted October 9, 2007 I made the changes and still no luck, though that was something that should have been changed anyway. I've checked other threads and am still at a loss. Link to comment https://forums.phpfreaks.com/topic/72464-some-e-mail-addresses-not-working/#findComment-365397 Share on other sites More sharing options...
MadTechie Posted October 9, 2007 Share Posted October 9, 2007 OKay, lets go all out.. <?php $eol="\r\n"; $mime_boundary=md5(time()); # Common Headers $headers = ""; $headers .= "From: ".$Email."<".$Email.">".$eol; $headers .= "Reply-To: ".$Email."<".$Email.">".$eol; $headers .= "Return-Path: ".$Email."<".$Email.">".$eol; // these two to set reply address $headers .= "Message-ID: <".time()."-".$Email.">".$eol; $headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam-filters # Boundry for marking the split & Multitype Headers $headers .= 'MIME-Version: 1.0'.$eol.$eol; $headers .= "Content-Type: multipart/mixed; boundary=\"".$mime_boundary."\"".$eol.$eol; // send email $success = mail($EmailTo, $Subject, $Body, $headers); ?> Link to comment https://forums.phpfreaks.com/topic/72464-some-e-mail-addresses-not-working/#findComment-365402 Share on other sites More sharing options...
customcomputer Posted October 9, 2007 Author Share Posted October 9, 2007 Thanks for the effort, but it's still not working. I don't understand what makes Yahoo so special in this problem. Link to comment https://forums.phpfreaks.com/topic/72464-some-e-mail-addresses-not-working/#findComment-365531 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.