이 질문은 이미 제기되었지만 답변이 도움이된다는 것을 알고 있습니다.내 phpmailer 스크립트가 스팸 함으로 이동합니다
여기 내 코드는 당신이 뭔가 잘못 찾을 수 있기를 바랍니다.
<?php
require("phpMailer/class.phpmailer.php");
require("phpMailer/class.smtp.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Host = 'smtp.example.com';
$mail->Port = 587;
$mail->Username = "[email protected]"; // SMTP username
$mail->Password = "validpassword"; // SMTP password
$mail->From = "[email protected]";
$mail->FromName = "Mailer";
$mail->AddAddress("[email protected]");
$mail->AddReplyTo("[email protected]", "Mailer");
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
추신 : 재미있는 사실은 내 메일이 메일러()와 스팸 메일에 들어 가지 않는다는 것입니다.하지만 Phpmailer를 사용해야합니다.
'mail()'과'PHPMailer'의 차이점은 무엇입니까? – Barmar
스팸 폴더에있는 경우 스팸 기록 및 임계 값을 설명하는 추가 헤더가 이메일에있을 수 있습니다. (spamfighter 및 spamassassin은이 afaik를 수행합니다.) – Garytje
스팸으로가는 주소와 정확히 같은 이메일입니까? – Anigel