I am using class.phpmailer.php
to send email from my local server, it's processing well in my local server with PHP version php5.3.4
but after I update PHP version to 5.5.4
it's showing the following message:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in class.phpmailer.php`
This is the line causing the error:
$encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord(stripslashes('\\1')))", $encoded);
Try and Replace:
This
$encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',"'='.sprintf('%02X', ord(stripslashes('\\1')))", $encoded);
With
$encoded = preg_replace_callback('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/',function($m) { return '='.sprintf('%02X', ord(stripslashes($m[1]))); }, $encoded);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With