PHPMailer通过hotmail向垃圾邮件发送电子邮件

时间:2016-02-10 21:46:41

标签: php email phpmailer

我在使用phpmailer在hotmail帐户中发送电子邮件时遇到问题。这里有一些堆栈溢出的答案,但没有一个可以解决我的问题。我有相同的smtp用户,并且我没有包含垃圾短语'等等。这是代码:

require 'phpmailer/PHPMailerAutoload.php';      
$mail = new PHPMailer;  
$mail->isSMTP();
$mail->Host = 'localhost'; 
$mail->SMTPAuth = true;                                
$mail->Username = 'xx@kk.com'; // SMTP username                 
$mail->Password = 'yy'; // SMTP password
$mail->setFrom("xx@kk.com");
$mail->addAddress(zz);               
$mail->isHTML(true);                                
$mail->Subject = "sub";
$mail->Body     = "<!DOCTYPE html>";
$mail->Body    .= "<head></head>";
$mail->Body    .= "<body>";
$mail->Body    .= "<p style='font-size:22px; color:black;'>Thank you for using the <span style='color:rgb(29,91,104)'>Model</span>. Your code is:</p>";
$mail->Body    .= "<p style='font-size:19px; color:black;'>FB-".$x."X".$z."X".$y1."X".$y2."-".$kind."-H".$y3."</p>";
$mail->Body .= "<p style='font-size:19px; color:black;'>ForenBox: ". $kind2;
$mail->Body .= "<br>Long sides: ".$x."mm";
$mail->Body .= "<br>Height of Long sides: ".$y1."mm";
$mail->Body .= "<br>Short sides: ".$z."mm";
$mail->Body .= "<br>Height of Short sides: ".$y2."mm";
$mail->Body .= "<br>Height of Corners: ".$y3."mm</p>";
$mail->Body    .= "</body>";
$mail->Body    .= "</html>";
$mail->send();

谢谢!

0 个答案:

没有答案