PHPMailer 5.2.6 fails with TLS

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Chris
User
Posts: 162

PHPMailer 5.2.6 fails with TLS

Post by Chris »

I can no longer send email with TLS security. PHPmailer 5.2.1 (January 2012) has many security bugs that have been fixed since, but now I can't properly send mail using 5.2.6 (April 2013, not provided by PHPMaker) as the current stable mailer. I haven't tried with SSL because our servers are TLS.

The list of issues fixed with 5.2.6 are too long to list, but the changelog says it all! Including RFC compliance and iCal support, proper line endings, language fixes etc. 5.2.6 is very stable in our other applications (non-PHPMaker). Please, this needs to be updated.


Webmaster
User
Posts: 9430

Post by Webmaster »

Don't see any changes in PHPMailer's properties, still the same old:

$mail->SMTPSecure = 'tls';

So no changes should be required in PHPMaker (except the folder name "phpmailer521" if you put PHPMailer 5.2.6 in another folder). You may want to test sending email with your PHPMailer 5.2.6 with a separate script.


Chris
User
Posts: 162

Post by Chris »

The error thrown is:

Fatal error: Maximum execution time of 30 seconds exceeded in /opt/lampp/htdocs/xxx/cms10/phpmailer526/class.phpmailer.php on line 776

Line 776 in 5.2.6's class.phpmailer.php is a check for a very complex PCRE

(775:)
if (version_compare(PCRE_VERSION, '8.0') >= 0) {
(776:)
return (boolean)preg_match('/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]\x0D\x0A)?[\t ]+)?)(\((?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-\'-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))(?2)\)))+(?2))|(?2))?)([!#-\'+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))(?2)")(?>(?1)\.(?1)(?4))(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>(a-z0-9?)(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address);

(...)

The strange thing is we use PHPMailer 5.2.6 on all of our sites and they've never done this. Other sites using 5.2.6 are sending normally. We send to an external Qmail server on a high non-standard port, and according to netstat it is trying the correct port, and I can telnet to that port from the test box running this site.


Post Reply