]> mop.ddnsfree.com - git repositories - brisk.git/commit
PHPMailer 5.1 replaced by a vendored 7.1.1
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:28:36 +0000 (12:28 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 13 Sep 2026 10:28:36 +0000 (12:28 +0200)
commit683047f8eeee22d2fb7eb2922302e1bea8197010
tree6a92f475dfe23b1512546b2a55e825b271793a63
parente6c3174bac4c08c87309c2389ec344c3e8144ca0
PHPMailer 5.1 replaced by a vendored 7.1.1

The class.phpmailer.php in web/Obj/ was the 5.1 release from 2009 and does
not run on php 8: it uses each() (removed in 8.0),
get_magic_quotes_runtime() and set_magic_quotes_runtime() (removed in 8.0)
and php4 style constructors.

Replaced by PHPMailer 7.1.1 in web/Obj/PHPMailer/ (src/ plus the italian
language file and the LICENSE). 7.x was chosen over 6.x because 7.0.0 is
identical to 6.11.1: the major bump only signals a compatibility break for
those who extend the class (lang(), setLanguage() and $language became
static), and here PHPMailer is not extended. It is the line maintained for
php 8.4. No composer: the project does not use it, and INSTALL.sh already
copies files recursively - only LICENSE and VENDOR.txt had to be added to
the list of copied names.

mail.phh adjusted: namespace PHPMailer\PHPMailer, explicit require of the
three files (no autoloader), setFrom() instead of assigning From/FromName
directly.

A missing catch was added too: brisk_mail() builds PHPMailer with
exceptions=TRUE, so send() throws instead of returning FALSE, but none of
the 7 callers catches and all of them test for "== FALSE". A delivery error
killed the spush daemon. The exception is now logged and reported as FALSE,
which is what the callers already expected.

NOTE: msgHTML() overwrites AltBody with its own conversion of the html, so
the text passed to brisk_mail() is discarded. This was already the case
with 5.1, and the behaviour is left untouched (see the comment in the file).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014M1jiEq9cHdE5SE5j6vFuE
13 files changed:
INSTALL.sh
web/Obj/PHPMailer/LICENSE [new file with mode: 0644]
web/Obj/PHPMailer/VENDOR.txt [new file with mode: 0644]
web/Obj/PHPMailer/language/phpmailer.lang-it.php [new file with mode: 0644]
web/Obj/PHPMailer/src/DSNConfigurator.php [new file with mode: 0644]
web/Obj/PHPMailer/src/Exception.php [new file with mode: 0644]
web/Obj/PHPMailer/src/OAuth.php [new file with mode: 0644]
web/Obj/PHPMailer/src/OAuthTokenProvider.php [new file with mode: 0644]
web/Obj/PHPMailer/src/PHPMailer.php [new file with mode: 0644]
web/Obj/PHPMailer/src/POP3.php [new file with mode: 0644]
web/Obj/PHPMailer/src/SMTP.php [new file with mode: 0644]
web/Obj/class.phpmailer.php [deleted file]
web/Obj/mail.phh