Quantcast
Channel: WordPress.org Forums » [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin] Support
Viewing all articles
Browse latest Browse all 5161

dyelawn on "[Plugin: WP Mail SMTP] PHP 5.3 - ereg() deprecated"

$
0
0

If your server is running PHP 5.3+, you'll get a deprecation notice when ereg() is called on line 351 of wp_mail_smtp.php. This can be fixed by replacing the regex email check with PHP's built-in filter_var() function for checking emails:

// replace the following on lines 351-353
if (preg_match('^[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+'.'@'.
        '[-!#$%&\'*+\\/0-9=?A-Z^_a-z{|}~]+\.'.
        '[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+$', $email))

// change to:
if (filter_var($email, FILTER_VALIDATE_EMAIL))

http://wordpress.org/extend/plugins/wp-mail-smtp/


Viewing all articles
Browse latest Browse all 5161

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>