diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 2ebfb405c4..2c9f44cb69 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -216,6 +216,12 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php'; require_once ABSPATH . WPINC . '/PHPMailer/Exception.php'; $phpmailer = new PHPMailer\PHPMailer\PHPMailer( true ); + + /** + * Set email validation to use WordPress's built-in is_email(). + * @ticket 50720 + */ + $phpmailer::$validator = 'is_email'; } // Headers.