时事通讯 - 未发送电子邮件

时间:2015-01-05 17:53:46

标签: php

<?php
if (isset($_POST['send'])) {
$sqls = mysql_query("SELECT * FROM settings LIMIT 1");
$rows = mysql_fetch_array($sqls);

$from    = $rows['email'];
$owner   = $rows['owner'];
$subject = $_POST['subject'];
$message = $_POST['message'];

$sqlu = mysql_query("SELECT * FROM useri WHERE banned='No'");
while ($rowu = mysql_fetch_assoc($sqlu)) {
    $to      = $rowu['email'];
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
    $headers .= 'To: ' . $to . ' <' . $to . '>' . "\r\n";
    $headers .= 'From: ' . $owner . ' <' . $from . '>' . "\r\n";
    @mail($to, $subject, $message, $headers);
}


echo '<meta http-equiv="refresh" content="0;url=newsletter.php">';
}
?>

我不知道错误在哪里,但我没有收到任何电子邮件......出了什么问题?我之前在stackoverflow上搜索过,但是我找不到asnwer ...谢谢!

0 个答案:

没有答案