Booked Scheduler Community Support
February 26, 2020, 07:27:01 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Email not working - PHP 7.3+ - phpmailer issue with PCRE  (Read 114 times)
fxa
Newbie
*

Karma: 0
Posts: 1


« on: January 10, 2020, 08:25:34 PM »

I have discovered an issue with email working on PHP 7.3+ due to a bug with phpmailer and an updated version of pcre

Since phpmailer 5.2 is no longer supported and not compatible with PHP 7.3+ and pcre version 10.31 (or above). That version comes bundled with PHP by default

Lower versions of PHP use pcre 8.41 and this works.

Now where the issue lies is a function in phpmailer called validateAddress that checks if the email is properly formatted. Due to the new pcre libary, this doesn't work.

To fix it, there's two things that need to be done
1. As a workaround, you can just update the validateAddress function in the /lib/external/phpmailer/class.phpmailer.php file with the new function from the new version (per https://github.com/PHPMailer/PHPMailer/blob/master/src/PHPMailer.php)

- find the "public static function validateAddress" in the code
- delete the whole function
- replace it with the one from the new version

2. Nick may need to consider upgrading the phpmailer class to v6+ for greater compatability too
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!