我想用PHP發送電子郵件。PHP發送電子郵件GMAIL錯誤
public function email($to, $title, $message){
$from = "[email protected]";
$headers = "From: {$from}\r\n";
$headers .= "X-Confirm-Reading-To: {$from}\r\n";
$headers .= "Reply-To: {$from}\r\n";
$headers .= "Organization: InfiniSys, inc.\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=ISO-8859-1\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n";
$subject = $title;
mail($to, $subject, $message, $headers);
}
消息發送;但是,Gmail給我一個錯誤。 「 」Gmail無法驗證mysite.com是否實際發送了此郵件(而不是垃圾郵件發送者)「。
SPF記錄:(我不知道這是什麼)
SPF record lookup and validation for: rrh.com
SPF records are published in DNS as TXT records.
The TXT records found for your domain are:
v=spf1 include:spf.protection.outlook.com a:mailman1-eqix-sjo.packet8.net a:mailman1-eq.packet8.net -all
google-site-verification=GDHGdTnww1rIsh46Zd-n7I-E6d6Fa1n83XZ0ppfx4e8
MS=ms49526710
google-site-verification=-O2gI7Ji-rmEFlZQq8d85jHef7bEk0UcDXt-6MW419I
Checking to see if there is a valid SPF record.
Found v=spf1 record for rrh.com:
v=spf1 include:spf.protection.outlook.com a:mailman1-eqix-sjo.packet8.net a:mailman1-eq.packet8.net -all
evaluating...
SPF record passed validation test with pySPF (Python SPF librar
其eiter頭問題,或者在我結束一個錯誤配置。我總是谷歌之前,我張貼求助。 –
你的SPF記錄是什麼樣的? – Chris
使用phpmailer代替https://github.com/PHPMailer/PHPMailer –