使用mail()函数时遇到的两个问题
1.我用mail()函数成功的给163信箱发送了邮件,但新浪和sohu的信箱却收不到
而用新浪托管的邮箱用foxmail却可以收到.
2.每次使用mail()
root 1485 0.0 0.0 6100 548 ? S 03:02 0:24 sendmail: accepting connections
smmsp 1497 0.0 0.0 5980 324 ? S 03:02 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue ;
这两个进程不会结束
哪位路过的大侠请指点一二.
php代码如下
<?php
/*-------------------------------------------
|FileName:sendEmail.php
|Date:2006-10-25
+-----------------------------------------*/
$message = $_POST['message'];
$message .= "</body></html>";
$email = $_POST['email'];
$subject = "话单";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]'. "\r\n" .
'X-Mailer: PHP/';
$to = $email;
$mail = mail($to, $subject, $message, $headers);
if($mail)
{
echo "<br/>";
echo "发送成功!";
exit;
}
else
{
echo "<br/>";
echo "发送失败!";
}
?> ;
[
本帖最后由 心如水流 于 2006-10-27 11:30 编辑 ]