Mail der ikke vil sende
Hej folkens,Jeg har et meget underligt problem, jeg tror at scriptet virker ganske fint.
Jeg er igang med at lave et maillist system, men synes bare ikke at det fungerer.
Her er resultatet:
Sender til mc@*****.dk - Sendt
Sender til dr@*****.dk - Sendt
Men e-mail adressen mc@*****.dk modtager intet, hvorimod dr@*****.dk fint modtager.
Hvad kan det skyldes ?
------------------------------
if ($mode == "send") {
$settings_row = mysql_query("SELECT website FROM cms_sites WHERE id = 1");
$settings = mysql_fetch_array($settings_row);
$url = $settings["website"];
function sleep2($seconds) {
usleep(floor($seconds*1000000));
}
ob_implicit_flush(true);
$row = mysql_query("SELECT * FROM cms_newsletter_subscribers WHERE liste");
while ($data = mysql_fetch_array($row)) {
echo "Sender til " . $data["email"] . " - ";
$mail_recipient = $data["email"];
$mail_sender = $_POST["sender_mail"];
$mail_sender_navn = $_POST["sender_navn"];
$mail_subject = $_POST["email_emne"];
$mail_body = $_POST["content"];
$mail_body = str_replace("/userfiles/", $url."/userfiles/", $mail_body);
$mail_body = str_replace('\"', '"', $mail_body);
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ". $mail_sender_navn . " <" . $mail_sender . ">\r\n";
if (mail($mail_recipient, $mail_subject, $mail_body, $headers)) {
echo("Sendt");
} else {
echo("Mislykkeds");
}
echo "<br>";
flush();
sleep(1);
flush();
}
}