0

I have problems with sending email with phpmailer in hotmail accounts. There are some answers here in stack overflow but none of them can solve my problem. I have the same smtp user and from, i do not include 'spam phrases' etc.. here is the code:

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();

Thanks!

Iraklis Bekiaris
  • 1,163
  • 15
  • 43
  • this might not be code problem, since it is sending, check for all parameters checked to determinate if a mail is spam or not... – jpganz18 Feb 10 '16 at 21:48
  • Hello jpganz18 thanks for the respone. What to do you mean by checking the parameters? What parameters are you talking about? – Iraklis Bekiaris Feb 10 '16 at 21:49
  • 1
    You can take a look here...http://mailchimp.com/resources/guides/how-to-avoid-spam-filters/html/ https://sendgrid.com/blog/10-tips-to-keep-email-out-of-the-spam-folder/ – jpganz18 Feb 10 '16 at 21:51

0 Answers0