Convert eregi_replace to preg_replace in old class.phpmailer.php scripts
Problem: I have lots of legacy php code on old sites that uses eregi_replace to format up an HTML email body. As eregi_replace is now depreciated it can be replaced with preg_replace. This is tricky sometimes because the formatting is quite different. Fix: Here’s a common line from class.phpmailer.php scripts: $emailBody = eregi_replace("[\]",”,$emailBody); To convert that you’ll need to do this: [...]