我已經爲此尋找解決方案,但沒有一個解決了我的問題。我也在使用Google應用。Gmail將合法的郵件從php mail()函數發送到垃圾郵件文件夾
這裏的Gmail上接收到的消息的副本:
Delivered-To: [email protected]
Received: by 10.114.37.166 with SMTP id z6csp286681ldj;
Tue, 22 Jan 2013 17:22:28 -0800 (PST)
X-Received: by 10.236.119.206 with SMTP id n54mr27422481yhh.8.1358904147674;
Tue, 22 Jan 2013 17:22:27 -0800 (PST)
Return-Path: <[email protected]>
Received: from smtp-web3-ctba.kinghost.net (smtp-web3-ctba.kinghost.net. [177.12.170.3])
by mx.google.com with ESMTP id h1si4616624anp.108.2013.01.22.17.22.26;
Tue, 22 Jan 2013 17:22:27 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 177.12.170.3 as permitted sender) client-ip=177.12.170.3;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of [email protected] designates 177.12.170.3 as permitted sender) [email protected]
Received: from smtp-web-ctba.kinghost.net (smtp-web-ctba [127.0.0.1])
by smtp-web3-ctba.kinghost.net (Postfix) with ESMTP id 7C5D58F2AE
for <[email protected]>; Tue, 22 Jan 2013 23:22:26 -0200 (BRST)
Received: from web593.kinghost.net (unknown [10.27.86.33])
by smtp-web-ctba.kinghost.net (Postfix) with ESMTP id 7BB2BC2DFC6C
for <[email protected]>; Tue, 22 Jan 2013 23:22:26 -0200 (BRST)
Received: by web593.kinghost.net (Postfix, from userid 850)
id 77EA6E9B6; Tue, 22 Jan 2013 23:22:26 -0200 (BRST)
To: [email protected]
Subject: test mail
From: [email protected]
Subject: test mail
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Message-Id: <[email protected]>
Date: Tue, 22 Jan 2013 23:22:26 -0200 (BRST)
It's a test mail<br/>
Another line<br/>
Yet another line.
和jetcarros.com.br的SPF:
在其他情況下V = SPF1 IP4:177.12.170.0/24一個MX一個:jetcarros.com.br包括:aspmx.googlemail.com所有
,我發現人說,我可以在PHP郵件功能設置第五參數去解決問題「-f $ senderA dderess「,但是信封來源甚至不會出現在郵件的任何部分,如上所示。
這裏是我的腳本:
$email_content = implode ("\n",array ("It's a test mail", "Another line", "Yet another line.")
$email_headers = implode ("\n",array ("From: [email protected]", "Subject: test mail","Return-Path: [email protected]","MIME-Version: 1.0","Content-Type: text/html; charset=UTF-8"));
mail('[email protected]', 'test mail', nl2br($email_content), $email_headers, "[email protected]")
編輯:由於iWizardPro sugest我使用DKIM簽名我的郵件,幾個小時後,使其正確籤我已經做到了。但我的電子郵件不斷髮送垃圾郵件文件夾。
歡迎任何幫助。
http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html – 2013-01-23 02:32:57