Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 6250)
+++ wp-includes/pluggable.php	(working copy)
@@ -156,8 +156,14 @@
 		if ( !empty( $tempheaders ) ) {
 			// Iterate through the raw headers
 			foreach ( $tempheaders as $header ) {
-				if ( strpos($header, ':') === false )
+				if ( strpos($header, ':') === false ) {
+					if ( false !== stripos( $header, 'boundary=' ) ) {
+						$header = str_replace('BOUNDARY', 'boundary', $header);
+						$parts = explode('boundary=', trim( $header ) );
+						$boundary = trim( str_replace( array( '\'', '"' ), '', $parts[1] ) );
+					}
 					continue;
+				}
 				// Explode them out
 				list( $name, $content ) = explode( ':', trim( $header ), 2 );
 
@@ -183,7 +189,12 @@
 					if ( strpos( $content,';' ) !== false ) {
 						list( $type, $charset ) = explode( ';', $content );
 						$content_type = trim( $type );
-						$charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );
+						if ( false !== stripos( $charset, 'charset=' ) ) {
+							$charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );
+						} elseif ( false !== stripos( $charset, 'boundary=' ) ) {
+							$boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset ) );
+							$charset = '';
+						}
 					} else {
 						$content_type = trim( $content );
 					}
@@ -243,12 +254,12 @@
 
 	$content_type = apply_filters( 'wp_mail_content_type', $content_type );
 
+	$phpmailer->ContentType = $content_type;
+
 	// Set whether it's plaintext or not, depending on $content_type
 	if ( $content_type == 'text/html' ) {
 		$phpmailer->IsHTML( true );
-	} else {
-		$phpmailer->IsHTML( false );
-	}
+	} 
 
 	// If we don't have a charset from the input headers
 	if ( !isset( $charset ) ) {
@@ -263,6 +274,9 @@
 		foreach ( $headers as $name => $content ) {
 			$phpmailer->AddCustomHeader( sprintf( '%1$s: %2$s', $name, $content ) );
 		}
+		if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) ) {
+			$phpmailer->AddCustomHeader( sprintf( "Content-Type: %s;\n\t boundary=\"%s\"", $content_type, $boundary ) );
+		}
 	}
 
 	do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
