Var*_*ran 19 email phpmailer dkim
电流我使用phpmailer发送邮件.现在如何使用DKIM密钥在phpmailer中发送电子邮件
我在phpmailer类文件中搜索,我找到了下面的代码
/**
* DKIM selector.
* @type string
*/
public $DKIM_selector = '';
/**
* DKIM Identity.
* Usually the email address used as the source of the email
* @type string
*/
public $DKIM_identity = '';
/**
* DKIM passphrase.
* Used if your key is encrypted.
* @type string
*/
public $DKIM_passphrase = '';
/**
* DKIM signing domain name.
* @example 'example.com'
* @type string
*/
public $DKIM_domain = '';
/**
* DKIM private key file path.
* @type string
*/
public $DKIM_private = '';
Run Code Online (Sandbox Code Playgroud)
我能知道它的可能性吗?请帮助我
Syn*_*hro 36
如果你看看PHPMailer单元测试,有一个如何设置DKIM的例子.
以下是您发送消息时需要做的基本操作(显然更改域,密钥路径和选择器以匹配您的配置,如果您使用密码路径,则添加密码); 这也假设您打算使用与您的From地址相同的标识符进行签名:
$mail->DKIM_domain = 'example.com';
$mail->DKIM_private = '/path/to/my/private.key';
$mail->DKIM_selector = 'phpmailer';
$mail->DKIM_passphrase = '';
$mail->DKIM_identity = $mail->From;
Run Code Online (Sandbox Code Playgroud)
当您send()收到消息时(而不是之前),它将使用这些设置生成DKIM签名.
| 归档时间: |
|
| 查看次数: |
26130 次 |
| 最近记录: |