mem0ri Posted November 1, 2006 Share Posted November 1, 2006 So I've got a great mail function that works just fine...which I only found out after going through my SMTP server logs and then sending mail to a completely unfiltered e-mail address......because it seems that 99% of mailbox providers (Gmail, Yahoo, Hotmail, etc) deny mail coming from my server...Obviously, that's a big problem. No, I'm not creating a spam-mailer...more a "forgot password" response mailer......is there anything I can put in headers to pass through the filtering? Or really...any sort of thing I can do to pass through the filtering? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted November 1, 2006 Share Posted November 1, 2006 Please post the source of the script that sends the mail.Ken Quote Link to comment Share on other sites More sharing options...
mem0ri Posted November 1, 2006 Author Share Posted November 1, 2006 Sure...here is the code:[code=php:0]$from = "admin@mydomain.com";$subject = $_POST['subject'];$body = $_POST['body'];$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; $headers .= 'Date:'.date("r")."\r\n";$headers .= 'Subject: '.$subject."\r\n"; //...code here to create array of emails to send mail to... 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.