Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 5660)
+++ wp-includes/pluggable.php	(working copy)
@@ -171,7 +171,7 @@
 	extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers' ) ) );
 	
 	// Default headers
-	if ( empty( $headers ) ) {
+	if ( '' == $headers ) {
 		$headers = array(
 			'MIME-Version' => '1.0'
 		);
@@ -180,44 +180,48 @@
 		// string headers and an array of headers.
 		$tempheaders = (array) explode( "\n", $headers );
 		$headers = array();
-		
-		// If it's actually got contents
-		if ( !empty( $tempheaders ) ) {
-			// Iterate through the raw headers
-			foreach ( $tempheaders as $header ) {
-				// Explode them out
-				list( $name, $content ) = explode( ':', trim( $header ), 2 );
-				
-				// Cleanup crew
-				$name = trim( $name );
-				$content = trim( $content );
-				
-				// Mainly for legacy -- process a From: header if it's there
-				if ( $name == 'From' ) {
-					if ( strpos( '<', $content ) !== false ) {
-						// So... making my life hard again?
-						$from_name = substr( $content, 0, strpos( '<', $content ) - 1 );
-						$from_name = str_replace( '"', '', $from_name );
-						$from_name = trim( $from_name );
-						
-						$from_email = substr( $content, strpos( '<', $content ) + 1 );
-						$from_email = str_replace( '>', '', $from_email );
-						$from_email = trim( $from_email );
-					} else {
-						$from_name = trim( $content );
-					}
-				} elseif ( $name == 'Content-Type' ) {
-					if ( strpos( ';', $content ) !== false ) {
-						list( $type, $charset ) = explode( ';', $content );
-						$content_type = trim( $content_type );
-						$charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );
-					} else {
-						$content_type = trim( $content );
-					}
+	} else {
+		// We were passed an array of raw headers.
+		$tempheaders = $headers;
+		$headers = array();
+	}
+	
+	// If it's actually got contents
+	if ( !empty( $tempheaders ) ) {
+		// Iterate through the raw headers
+		foreach ( $tempheaders as $header ) {
+			// Explode them out
+			list( $name, $content ) = explode( ':', $header, 2 );
+			
+			// Cleanup crew
+			$name = trim( $name );
+			$content = trim( $content );
+			
+			// Mainly for legacy -- process a From: header if it's there
+			if ( $name == 'From' ) {
+				if ( strpos( $content, '<' ) !== false ) {
+					// So... making my life hard again?
+					$from_name = substr( $content, 0, strpos( $content, '<' ) - 1 );
+					$from_name = str_replace( '"', '', $from_name );
+					$from_name = trim( $from_name );
+					
+					$from_email = substr( $content, strpos( $content, '<' ) + 1 );
+					$from_email = str_replace( '>', '', $from_email );
+					$from_email = trim( $from_email );
 				} else {
-					// Add it to our grand headers array
-					$headers[trim( $name )] = trim( $content );
+					$from_name = trim( $content );
 				}
+			} elseif ( $name == 'Content-Type' ) {
+				if ( strpos( ';', $content ) !== false ) {
+					list( $type, $charset ) = explode( ';', $content );
+					$content_type = trim( $type );
+					$charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );
+				} else {
+					$content_type = trim( $content );
+				}
+			} else {
+				// Add it to our grand headers array
+				$headers[$name] = $content;
 			}
 		}
 	}

