我无法发送电子邮件 php 到 Hotmail?



这是我的代码:

<?php
$to = 'test@hotmail.com';
$subject = 'reservation hotel n';
$msg ='ok';
// Make sure to escape quotes
$headers  = 'MIME-Version: 1.0' . "rn";
$headers .= 'Content-type: text/html; charset=utf-8' . "rn";
$headers .= 'From:  hôtel  <reservation@hotel.com' . "rn";
mail($to, $subject, $msg, $headers);
?>

它适用于Gmail、雅虎、GMX。。。但它不适用于Hotmail/Live/MSN。

因为它适用于Gmail,我可以假设它与我的服务器无关,对吧?

我还试过:http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/Default.aspx

正在进行系统维护。请稍后再试。

think's for help

Check it
<?php
   $to = "$email";
    $subject = "Welcome to";
    $message = " Hi $username,<br /><br />
    Thank you for signing up with us.<br />
    Thanks <br />";
    // Always set content-type when sending HTML email
    $headers = "MIME-Version: 1.0" . "rn";
    $headers .= "Content-type:text/html;charset=iso-8859-1" . "rn";
    // More headers
    $headers .= 'From: <test@gmail.com>' . "rn";
    $mail=mail($to,$subject,$message,$headers);
?>

使用php mailer 更改时解决的问题

require_once "class.phpmailer.php"; 
require_once "class.smtp.php"; 

$mail->Host       = "smtp.gmail.com";  
$mail->Port       =  587;  
$mail->Username = "**@gmail.com";
$mail->Password = "**";
$mail->From       = "***";  
$mail->FromName   = "Hôtel **";  
$mail->IsHTML(true); // if you are going to send HTML formatted emails
$mail->SingleTo = true; // if you want to send a same email to multiple users. multiple emails will be sent one-by-one.
//Caractéristiques du message  
$mail->CharSet     = 'utf-8';  
$mail->ContentType = 'text/plain';  
$mail->Encoding    = '8bit';  
$mail->Subject    = "**";  
$mail->Body       = "okkk";  
$mail->WordWrap   = 0;  
$mail->AddAddress("**@hotmail.com", "nom");  
$mail->Send();

我认为您需要其中一个才能工作:发件人ID框架SPF记录向导

它应该可以解决你的问题,因为Hotmail希望这样做是为了安全。

相关内容

  • 没有找到相关文章

最新更新