diff --git a/tests/phpunit/tests/mail.php b/tests/phpunit/tests/mail.php
index 1522594..316d67e 100644
--- a/tests/phpunit/tests/mail.php
+++ b/tests/phpunit/tests/mail.php
@@ -392,4 +392,18 @@ class Tests_Mail extends WP_UnitTestCase {
 		$this->assertEquals( 'wp_mail_failed', $call_args[0]->get_error_code() );
 		$this->assertEquals( $expected_error_data, $call_args[0]->get_error_data() );
 	}
+
+	/**
+	 * @ticket 39360
+	 */
+	public function test_wpmail_invalid_from_address_should_not_throw_exception() {
+		$_SERVER['SERVER_NAME'] = '_';
+		$to = 'user@example.org';
+
+		$ma = new MockAction();
+		add_action( 'wp_mail_failed', array( &$ma, 'action' ) );
+		wp_mail( $to, 'Testing', 'Test Message' );
+
+		$this->assertEquals( 1, $ma->get_call_count() );
+	}
 }
