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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

renatovargas’s picture

Assigned: Unassigned » renatovargas
Status: Active » Needs review
FileSize
2.25 KB

I 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.

haggins’s picture

Status: Needs review » Reviewed & tested by the community

Clever!
I sent a few mails and it worked. Thank you!

Norberto Ostallo’s picture

Issue summary: View changes

I confirm the patch works fine.

sinasalek’s picture

The patch #1 applied cleanly and the issue has been resolved on latest php 5.5 version

7thkey’s picture

Patch is working perfect!
Thanks

stefan.korn’s picture

Same 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.

joelpittet’s picture

Thank you for the patch! RTBC++

stevenx’s picture

works. thanks

  • wundo committed 1731ced on 7.x-1.x
    Issue #2103141 by renatovargas, haggins: Fixes 'Deprecated function:...
wundo’s picture

Status: Reviewed & tested by the community » Fixed
joelpittet’s picture

Thank you @wundo!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.