These malformed links are critical now, as gmail and others use the one click unsubscribe for those who want to report spam, so having them function is very important.
I used ChatGPT to create this patch, and have tested it. It is attached and I hope I donāt have to keep patching it myself with new updatesāplease consider fixing this bug for good!
It is just small changes to two files:
/lists/admin/lib.php
/lists/admin/PHPMailer6/src/PHPMailer.php
@keeenone Which version of phplist are you using? I send through SMTP and donāt have encoded headers. If I change to send using php mail() then I do get encoded headers.
This problem has been going on continuously for years, but only now could I address it with a fix using ChatGPT for help. The subject is still doing this, but I havenāt had time to fix that yet.
WITH THIS:
//RFC 2369/8058: keep List-* headers as raw angle-bracketed URLs (no RFC2047 encoding)
$mail->addCustomHeader(āList-Unsubscribeā, ā<ā.$removeurl.$sep.āemail=ā.$to.ā&jo=1>ā);
/lists/admin/PHPMailer6/src/PHPMailer.php
LINE 2668