Index: tests/mail.php
===================================================================
--- tests/mail.php	(revision 1195)
+++ tests/mail.php	(working copy)
@@ -210,4 +210,31 @@
 		$this->assertEquals($message . "\n", $GLOBALS['phpmailer']->mock_sent[0]['body']);
 		unset( $_SERVER['SERVER_NAME'] );
 	}
+	
+	/**
+	 * @ticket 23291
+	 */
+	function test_wp_mail_return_true_with_non_fatal_errors_by_default() {
+		$result = wp_mail( 'valid@address.com', 'subject', 'body', "Cc: invalid-address\nBcc: @invalid.address", ABSPATH . '/non-existant-file.html' );
+		$this->assertTrue( $result );
+	}
+	
+	/**
+	 * @ticket 23291
+	 */
+	function test_wp_mail_return_wp_error_for_fatal_errors_when_requested() {
+		$result = wp_mail( 'invalid.address', 'subject', 'body', '', array(), 'wp_error' );
+		$this->assertWPError( $result );
+	}
+
+ 	/**
+	 * @ticket 23291
+	 */	
+	function test_wp_mail_return_wp_error_for_non_fatal_errors_when_requested()
+	{
+		$result = wp_mail( 'valid@address.com', 'subject', 'body', "Cc: invalid_address\nBcc: another_invalid_address", array( '/this/file/does/not/exist' ), 'wp_error' );
+		$this->assertWPError( $result );
+		$this->assertCount( 3, $result->get_error_codes() );
+		$this->assertNotContains( 'mailer_send', $result->get_error_messages() ); 
+	}
 }
