mem0ri Posted November 1, 2006 Share Posted November 1, 2006 I've got a website running off a Win. 2003 Server with PHP 4.4.3 and MySQL 5 (though MySQL is unimportant to this problem). Everything SEEMS to be working just fine...and in fact, when I send an e-mail through the contact form, I even get a report back that mail has been sent correctly......unfortunately...neither I, nor anyone else who tests the functionality, receives an e-mail from the contact form. I can't find anything wrong with the code...maybe some help? (code pasted below)[code=php:0]if(isset($subject) && isset($body) && $subject != "" && $body != ""){ for($x = 0; $x < count($email_list); $x++) { mail($email_list[$x], $subject, $body, $headers); if($x == 0 && count($email_list) > 1) echo("<span class=\"notification\">E-Mail sent to: ".$email_list[$x].", "); else if($x == 0 && count($email_list) == 1) echo("<span class=\"notification\">E-Mail sent to: ".$email_list[$x]."</span>"); else if($x == (count($email_list) - 1) && $x != 0) echo($email_list[$x]."</span>"); else echo($email_list[$x].", "); }}[/code]Umm...I guess the other relevant part may be the $headers variable...which is:$headers = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";$headers .= 'From:'.$from."\r\n".'Reply-To:'.$from; Link to comment https://forums.phpfreaks.com/topic/25763-trouble-with-mail-function/ Share on other sites More sharing options...
stewart715 Posted November 1, 2006 Share Posted November 1, 2006 Have you checked your spam box for the message? Link to comment https://forums.phpfreaks.com/topic/25763-trouble-with-mail-function/#findComment-117632 Share on other sites More sharing options...
mem0ri Posted November 1, 2006 Author Share Posted November 1, 2006 Yes...have checked the spam box and have tried sending to a variety of mail services (G-mail, Hotmail, Yahoo mail, private domain e-mails I own, etc). Link to comment https://forums.phpfreaks.com/topic/25763-trouble-with-mail-function/#findComment-117633 Share on other sites More sharing options...
stewart715 Posted November 1, 2006 Share Posted November 1, 2006 How is your server sending mail? Link to comment https://forums.phpfreaks.com/topic/25763-trouble-with-mail-function/#findComment-117635 Share on other sites More sharing options...
mem0ri Posted November 1, 2006 Author Share Posted November 1, 2006 The server uses POP3/SMTP. The SMTP Service is running with MailEnable. Also...checking the logs...I'm finding:11/01/06 11:34:28 SMTP-OU B2C0A0D352E04445A17E73E458DD3293.MAI 364 xx.xxx.xxx.xx RCPT RCPT TO:<[email protected]> 250 Accepted 34 14UPDATE: It looks like the mail is sending correctly, but is being blocked by the great majority of mailbox providers. Obviously, that's not a good thing (especially since the emailer is primarily for allowing members to reset their password)....so...maybe some ideas on how to get these e-mails unblocked? Maybe something in the headers? Link to comment https://forums.phpfreaks.com/topic/25763-trouble-with-mail-function/#findComment-117951 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.