Read confirmation with PHPMAILER

10,779

Solution 1

$mail->AddCustomHeader( "X-Confirm-Reading-To: [email protected]" );

$mail->AddCustomHeader( "Return-receipt-to: [email protected]" );

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

Solution 2

I found that capitalization is important to some email client programs. Also some use Disposition-Notification-To. This is what I reccommend:

$mail->AddCustomHeader( "X-Confirm-Reading-To: $eUser" );
$mail->AddCustomHeader( "Return-Receipt-To: $eUser" );
$mail->AddCustomHeader( "Disposition-Notification-To: $eUser" );
Share:
10,779
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I try to return a reading confirmation when send an email with PHPMAILER but it doesn't works :(

    I tried these options :

    Construction of the object:

    $mail = new PHPMailer;
    $mail->CharSet = 'UTF-8';
    $mail->From = '[email protected]';
    $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: [email protected]" );
    

    Second solution

    $mail->AddCustomHeader( "Return-receipt-to: [email protected]" );
    

    third solution

    $mail->AddCustomHeader( "Disposition-Notification-To:<[email protected]>");
    

    Fourth solution

    $mail->ConfirmReadingTo = "[email protected]";
    

    But nothing works,