我尝试在使用 PHPMAILER 发送电子邮件时返回阅读确认,但它不起作用:(
我尝试了这些选项:
对象的构造:
$mail = new PHPMailer;
$mail->CharSet = 'UTF-8';
$mail->From = '[email protected] /cdn-cgi/l/email-protection';
$mail->FromName = 'Nom Prénom';
$mail->addAddress($Desti);
$mail->addCC($CC);
$mail->addBCC($BCC);
$mail->isHTML(true);
$mail->Subject = 'MON SUJET';
$mail->Body = $MonTexteMail;
第一个解决方案 :
$mail->AddCustomHeader( 'X-pmrqc: 1' );
$mail->AddCustomHeader( "X-Confirm-Reading-To: [email protected] /cdn-cgi/l/email-protection" );
第二种解决方案
$mail->AddCustomHeader( "Return-receipt-to: [email protected] /cdn-cgi/l/email-protection" );
第三种解决方案
$mail->AddCustomHeader( "Disposition-Notification-To:<[email protected] /cdn-cgi/l/email-protection>");
第四种解决方案
$mail->ConfirmReadingTo = "[email protected] /cdn-cgi/l/email-protection";
但没有任何效果,
$mail->AddCustomHeader( "X-Confirm-Reading-To: [email protected] /cdn-cgi/l/email-protection" );
$mail->AddCustomHeader( "Return-receipt-to: [email protected] /cdn-cgi/l/email-protection" );
这有效,Outlook/Gmail/Thunderbird 检测到它并请求确认,我今天用它来编写一个小脚本。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)