[CORE][MAILER] Undefined constant "FILTER_FLAG_HOST_REQUIRED" #106

Closed
opened 2023-11-08 20:53:04 +01:00 by rooty · 3 comments
Owner

When sending a mail, phpmailer class returns a fatal error:

PHP Fatal error:  Uncaught Error: Undefined constant "FILTER_FLAG_HOST_REQUIRED" in /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php:3615
Stack trace:
#0 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(3581): PHPMailer::isValidHost()
#1 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(2320): PHPMailer->serverHostname()
#2 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(1437): PHPMailer->createHeader()
#3 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(1332): PHPMailer->preSend()
When sending a mail, phpmailer class returns a fatal error: ``` PHP Fatal error: Uncaught Error: Undefined constant "FILTER_FLAG_HOST_REQUIRED" in /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php:3615 Stack trace: #0 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(3581): PHPMailer::isValidHost() #1 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(2320): PHPMailer->serverHostname() #2 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(1437): PHPMailer->createHeader() #3 /home/rooty/Documents/Qware_core/lib/package/class.phpmailer.phpmailer.php(1332): PHPMailer->preSend() ```
rooty added the
bug
live
master
labels 2023-11-08 20:53:04 +01:00
rooty self-assigned this 2023-11-08 20:53:04 +01:00
Author
Owner

The FILTER_FLAG_HOST_REQUIRED filter flag was deprecated in PHP 7.3 and there are no longer any references to it in the PHPMailer code base. So a straightforward fix should be to simply update PHPMailer.

The FILTER_FLAG_HOST_REQUIRED filter flag was deprecated in PHP 7.3 and there are no longer any references to it in the PHPMailer code base. So a straightforward fix should be to simply update PHPMailer.
Author
Owner

PHPMailer updated to 6.8.1. No longer error on sending mail.

PHPMailer updated to 6.8.1. No longer error on sending mail.
Author
Owner

Pushed to master branch

Pushed to master branch
rooty closed this issue 2023-11-08 21:01:40 +01:00
rooty added the
fixed
label 2023-11-08 21:01:52 +01:00
Sign in to join this conversation.
No description provided.