나는 대학 웹 사이트에서 일하고 있습니다. 나는 php mail function
을 사용하여 이메일을 보내는 PHP 스크립트를 썼다. 하지만 문제는 내가 보낸 모든 이메일이받는 사람의 스팸/정크 폴더에 들어간다는 것입니다. 위해Php Mail받는 사람에게 스팸 함/정크 폴더
그것을를 해결하려면
내가 stackoverflow에서 유사한 문제에 대한 모든 단계에 대한 답변을 시도하고 serverfault 웹 사이트처럼 이름에서 * 적절한 헤더 * 정확한 등 그러나 아직 문제 해결되지 않았습니다.
<?php
$from_address="[email protected]".$_SERVER['SERVER_NAME'];
$from_name="webmaster";
$headers = "MIME-Version: 1.0\r\n"
."Content-Type: text/plain; charset=utf-8\r\n"
."Content-Transfer-Encoding: 8bit\r\n"
."From: =?UTF-8?B?". base64_encode($from_name) ."?= <$from_address>\r\n"
."X-Mailer: PHP/". phpversion();
$subject="Web Mail Testing";
$body="This is test Message";
$to="[email protected]";
mail($to, $subject, $body, $headers, "[email protected]{$_SERVER['SERVER_NAME']}");
echo "The Mail is SuccessFully Sent to :".$to;
?>
나는 또한
Delivered-To: [email protected]
Received: by 10.204.8.210 with SMTP id i18csp146000bki;
Wed, 21 Nov 2012 20:58:12 -0800 (PST)
Received: by 10.68.219.164 with SMTP id pp4mr1119127pbc.72.1353560291776;
Wed, 21 Nov 2012 20:58:11 -0800 (PST)
Return-Path: <[email protected]>
Received: from www.nitw.ac.in (www.nitw.ac.in. [218.248.13.200])
by mx.google.com with ESMTPS id sh10si3456960pbb.293.2012.11.21.20.58.10
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 21 Nov 2012 20:58:11 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of [email protected] designates 218.248.13.200 as permitted sender) client-ip=218.248.13.200;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of [email protected] designates 218.248.13.200 as permitted sender) [email protected]
Received: from www.nitw.ac.in (localhost.localdomain [127.0.0.1])
by www.nitw.ac.in (8.13.8/8.13.8) with ESMTP id qAM50M0h016190
for <[email protected]>; Thu, 22 Nov 2012 10:30:23 +0530
Received: (from [email protected])
by www.nitw.ac.in (8.13.8/8.13.8/Submit) id qAM50McG016189;
Thu, 22 Nov 2012 10:30:22 +0530
Date: Thu, 22 Nov 2012 10:30:22 +0530
Message-Id: <[email protected]>
X-Authentication-Warning: www.nitw.ac.in: nobody set sender to [email protected] using -f
To: [email protected]
Subject: Web Mail Testing
X-PHP-Originating-Script: 0:mailer.php
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
From: =?UTF-8?B?d2VibWFzdGVy?= <[email protected]>
X-Mailer: PHP/5.3.5
This is test Message
(난 내 Gmail 계정 "[email protected]"에서받은) 원본 이메일을 첨부하고 있습니다 :
이
보내고 이메일 PHP 코드입니다 또한 검색하는 동안 나는 이런 종류의 문제에 대한 드문 이유가server Blacklisting
이라는 것을 알게되었습니다.
그때 나는 그것을 테스트하기 위해 다음과 같은 도구를 사용 http://www.mxtoolbox.com/SuperTool.aspx?action=mx%3anitw.ac.in#
위의 도구 테스트가 블랙리스트에 내 서버를 발견했을 때 나는 충격을 받았습니다. ? 내가 위의 첨부 된 원본 메일을 말한다 때문에 방법 "이 사실이다 : 내 서버가 블랙리스트 경우 Received-SPF: pass (google.com: best guess record for domain of [email protected] designates 218.248.13.200 as permitted sender)
은 또한 다음 내가 어떻게 블랙리스트에 대한 이유를 찾을 수 있습니다 그것을 해결하는 방법
? UPD : 그림자 댓글 : "X-Authentication-Warning : www.nitw.ac.in : 아무도"-f "msg를 사용하여 보낸 사람을 [email protected]으로 설정할 수 있습니까? 그렇다면, 어떻게 해결할 수 있습니까?
감사합니다!
나는이 실험을하고, 문제가 내 서버가 동적 있다고했다 IP 주소. 이것은 당신에게 적용됩니까? 이러한 종류의 서버가 스패머가 될 가능성이 있기 때문에 차단하는 것이 일반적입니다. – Shadow
@ Shadow : 정적 IP가 아닙니다. http://whatismyipaddress.com/ip/218.248.13.200 –
충분합니다. 스팸으로 신고 할 수있는 또 다른 문제는 잘못된 발신자 헤더입니다. 'X-Authentication-Warning : www.nitw.ac.in : 아무도 -f를 사용하여 보낸 사람을 [email protected]으로 설정하면 나에게 상당히 시끄러워 보인다. 이메일을'nobody @ localhost'로 보냅니 까? 나는 PHP에서 다시 steppping 시도하고 - 당신이 사용하는 SMTP 서버에 퍼티 시도. – Shadow