나는 이것에 대해 많은 것을 읽고 있었지만 여전히 해결책을 찾지 못했습니다. 나는 일단 양식을 제출하면 사용자에게 이메일로 바우처를 보내는 사이트를 만들고 있습니다. 내가 겪고있는 문제는 스크립트에서 보낸 메일이 스팸 필터에 의해 스팸으로 차단되고 있지만 아직 사용자가 제출하지 않았기 때문입니다. 이 스크립트는 제가 사용하고있는 스크립트입니다 :mail()에서 보낸 모든 메일이 스팸 함으로 전달되지만 머리글은 정확합니다.
<?php
error_reporting(0);
include("/home/users/web/b2243/moo.wheree/inc/event.inc");
include("/home/users/web/b2243/moo.wheree/inc/ad.inc");
$boundary = md5(time()) . "-2";
$eol = "\r\n";
$subject = "Tonights wheree voucher - $offer";
$fromaddress = "[email protected]";
$fromname = "wheree";
$headers = '';
$headers .= "Message-ID: <".time()."-".$fromaddress.">" . $eol;
$headers .= "Date: ".date('r'). $eol;
$headers .= "From: ".$fromname. "<".$fromaddress.">" . $eol;
$headers .= "Reply-To: ".$fromname. "<".$fromaddress.">" . $eol;
$headers .= "Return-Path: ".$fromname."<".$fromaddress.">" . $eol;
$headers .= "X-Mailer: PHP v" .phpversion(). $eol;
$headers .= 'MIME-Version: 1.0' . $eol;
$headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"" . $eol . $eol;
$headers .= "This is a MIME-formatted message.". $eol . $eol;
$msg = '';
//text
$msg .= "--" . $boundary . $eol;
$msg .= "Content-Type: text/plain; charset=gb2312" . $eol;
$msg .= "Content-Transfer-Encoding: 8bit" . $eol;
$msg .= "Content-Disposition: INLINE" . $eol;
$msg .= "Content-Description: INLINE Description;" . $eol;
$msg .= strip_tags(str_replace("<br>", "\n", $rBody));
$msg .= $eol . $eol;
//html
$msg .= "--" . $boundary . $eol;
$msg .= "Content-Type: text/html; charset=utf-8;" . $eol;
$msg .= "Content-Transfer-Encoding: 8bit" . $eol;
$msg .= "Content-Disposition: INLINE" . $eol;
$msg .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">" . $eol;
$msg .= 'Message Contents' . $eol;
$msg .= $eol . $eol;
$mail_sent = mail($email, $subject, $msg, $headers, "-f [email protected]");
// Check if Mail is sent
if ($mail_sent)
include("/home/users/web/b2243/moo.wheree/inc/sent.php");
else {
echo "<br> Message not sent, <a href="/">have another go</a>.<br>";
}
?>
사이트가 공유 호스팅 계획에서 호스팅되었는데, 이것이 문제가 될 수 있습니까? 나는 역방향 DNS에 대해서도 들었다. 귀하의 도움에 미리 감사드립니다.
아마 이미 스팸 발송자로 블랙리스트에 등록되어 있습니까? 당신은 자신에게 메일을 보내려고 할 수 있습니다. 때로는 스팸 방지 도구가 헤더를 추가하기 때문에 스팸이라고 생각하는 이유를 알 수 있습니다. – KingCrunch
사이트가 아직 시작되지 않았기 때문에 가능성은 희박합니다. –
공유 호스팅은 심각한 사이트에는 좋지 않으며, 헌신적으로 노력하면 모든 문제를 통제 할 수 있습니다. – Dan