How to send email with Phpmailer with DKIM signature?

我怕爱的太早我们不能终老 提交于 2019-12-06 02:11:18

$DKIM_private is for your private key and $DKIM_identity, well I'm not sure, but it's optional, and you can find more info here: http://dkim.org/specs/draft-allman-dkim-base-01.html#anchor9. Here is some example code.

$mail->DKIM_domain = 'mydomain.com';
$mail->DKIM_private = '/path/to/private_key';
$mail->DKIM_selector = 'default'; //this effects what you put in your DNS record
$mail->DKIM_passphrase = '1234567';

Hope that helps

You need to break up the DKIM-Signature header such that each property appears on a new line. The PHPMailer implementation of DKIM has some issues that must be corrected.

The $DKIM_identity value is optional. To understand the role of $DKIM_private, see the DKIM_Sign method.

Start here

http://dkim.worxware.com/

At the bottom - click Continue....

It will alow you to generate private/public key with instructions

In brief: - setup to send using the private/public key file to add dkim headers in email header - modify DNS txt record for the public key

I found that the latest version uses sha256 instead of sha1 so the existing DKIM generator (http://dkim.worxware.com/) doesn't work unless you go into the class.phpmailer.php file and edit all the mentions of sha256 back to sha1, doing this fixes issues with verifiers not being able to use sha256 for the public key (giving an error)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!