Read confirmation with PHPMAILER

I'm trying to get a read confirmation back when I send an email with PHPMAILER, but that doesn't work :(

I've tried these options:

Object construction:

$mail = new PHPMailer;
$mail->CharSet = 'UTF-8';
$mail->From = 'prenom.nom@mail.com';
$mail->FromName = 'Nom Prénom';
$mail->addAddress($Desti);
$mail->addCC($CC);
$mail->addBCC($BCC);
$mail->isHTML(true);
$mail->Subject = 'MON SUJET';
$mail->Body = $MonTexteMail;

      

first solution :

$mail->AddCustomHeader( 'X-pmrqc: 1' );
$mail->AddCustomHeader( "X-Confirm-Reading-To: mail.confirm@domain.com" );

      

Second solution

$mail->AddCustomHeader( "Return-receipt-to: mail.confirm@domain.com" );

      

third solution

$mail->AddCustomHeader( "Disposition-Notification-To:<mail.confirm@domain.com>");

      

Fourth solution

$mail->ConfirmReadingTo = "mail.confirm@domain.com";

      

But nothing works

+2


source to share


3 answers


$mail->AddCustomHeader( "X-Confirm-Reading-To: your@email.com" );

$mail->AddCustomHeader( "Return-receipt-to: your@email.com" );

      



This works, Outlook / Gmail / Thunderbird detects it and asks for confirmation, I used it today for a little script.

+4


source


I have found that capitalization is important in some email client programs. Also some people use Disposition-Notification-To. Here's what I recommend:



$mail->AddCustomHeader( "X-Confirm-Reading-To: $eUser" );
$mail->AddCustomHeader( "Return-Receipt-To: $eUser" );
$mail->AddCustomHeader( "Disposition-Notification-To: $eUser" );

      

0


source


The read letter with the receipt will be sent to the email address you provided:

$mail->ConfirmReadingTo = "email@address.com";

      

0


source







All Articles