Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Under PHP 5.5 I get the following warning when sending a mail:
Deprecated function: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in PHPMailer->EncodeQ() (Line 1757 in /var/www/xxx/sites/all/modules/smtp/smtp.phpmailer.inc).
Comment | File | Size | Author |
---|---|---|---|
#1 | smtp-remove-deprecated-modifier-2103141-1.patch | 2.25 KB | renatovargas |
Comments
Comment #1
renatovargas CreditAttribution: renatovargas commentedI made a patch to correct this. Actually I just copied the function given this error (only this function uses the /e modifier in smtp.phpmailer.inc) from the latest version of PHPMailer (https://github.com/Synchro/PHPMailer/blob/master/class.phpmailer.php) which corrected this.
Comment #2
haggins CreditAttribution: haggins commentedClever!
I sent a few mails and it worked. Thank you!
Comment #3
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedI confirm the patch works fine.
Comment #4
sinasalek CreditAttribution: sinasalek commentedThe patch #1 applied cleanly and the issue has been resolved on latest php 5.5 version
Comment #5
7thkey CreditAttribution: 7thkey commentedPatch is working perfect!
Thanks
Comment #6
stefan.kornSame here for me, patch works (copying function encodeQ from latest PHPMailer).
Should be put to dev and prod version in near future, since php 5.5 is no exotic version anymore.
Comment #7
joelpittetThank you for the patch! RTBC++
Comment #8
stevenx CreditAttribution: stevenx commentedworks. thanks
Comment #10
wundo CreditAttribution: wundo commentedComment #11
joelpittetThank you @wundo!