我們是最新版本的phpmailer類,並且想通過dkim簽名發送郵件,這個類是提供它的。但在收到郵件的dkim是硬性的。 我創建了密鑰並放入了dns記錄。我已經完成了在線DNS記錄測試,其確定。phpmailer DKIM dkim = hardfail
如何解決這個問題?
的代碼的例子是:
<?php
$mail->DKIM_domain = "my-domain.us";
$mail->DKIM_private = "url/.htkeyprivate";
$mail->DKIM_passphrase = "password";
$mail->DKIM_selector = 'phpmailer';
$mail->Sender = "[email protected]";
$mail->From = "my-domain.us";
$mail->FromName = "my-domain";
$mail->AddAddress("[email protected]", "receiver");
$mail->Subject = "Hello";
$mail->Body = "Hello World";
$mail->Send();
?>
結果: 驗證結果:mx.google.com; spf = neutral(google.com:92.43.143.174既不被apache @ devserv的域的最佳猜測記錄所允許也不被拒絕) [email protected]; dkim = hardfail [email protected]
DKIM-Signature:v = 1; A = RSA-SHA1; Q = DNS/TXT;升= 5; S = PHPMailer的; t = 1349788282 c =輕鬆/簡單; H =從:至:主題; d = my-domain.us; z = From:= my-domain = 20 | | Subject:= 20Hello; BH = CcbQDrWvT4E847f1X4iutz2u/CY =; B =3米/ CXrO6xNxoVSx0P1zXjhNy4QwGrixv0 // C8RgoNBUdS2kX8Evqlj3qZbWmZUQnJfc/u83Oi5r58UXueyx4sA ==
我的工作示例https://github.com/breakermind/PHP-DKIM/blob/master/zips/dkim-cron-send.php – 2017-09-26 12:17:41