diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 8f167ca2b16a8..1d5ee194c9f10 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -618,7 +618,7 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() */ do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) ); - $mail_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' ); + $mail_data = compact( 'to', 'subject', 'message', 'headers', 'attachments', 'embeds' ); // Send! try { diff --git a/tests/phpunit/tests/pluggable/wpMail.php b/tests/phpunit/tests/pluggable/wpMail.php index b7ed263b10ded..785c73eccda6e 100644 --- a/tests/phpunit/tests/pluggable/wpMail.php +++ b/tests/phpunit/tests/pluggable/wpMail.php @@ -446,6 +446,7 @@ public function test_phpmailer_exception_thrown() { 'message' => 'Test Message', 'headers' => array(), 'attachments' => array(), + 'embeds' => array(), 'phpmailer_exception_code' => 2, );