diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index fcc92fb71c..ef731793ef 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -472,16 +472,17 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() } catch ( phpmailerException $e ) { $mail_error_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' ); + $mail_error_data['phpmailer_exception_code'] = $e->getCode(); /** * Fires after a phpmailerException is caught. * * @since 4.4.0 * - * @param WP_Error $error A WP_Error object with the phpmailerException code, message, and an array + * @param WP_Error $error A WP_Error object with the phpmailerException message, and an array * containing the mail recipient, subject, message, headers, and attachments. */ - do_action( 'wp_mail_failed', new WP_Error( $e->getCode(), $e->getMessage(), $mail_error_data ) ); + do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', $e->getMessage(), $mail_error_data ) ); return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index d6d07c2e5c..6c0387b459 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39085'; +$wp_version = '4.7-beta1-39086'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.