Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 4275)
+++ wp-includes/pluggable.php	(working copy)
@@ -160,11 +160,28 @@
 
 if ( !function_exists('wp_mail') ) :
 function wp_mail($to, $subject, $message, $headers = '') {
+	global $is_Windows, $is_Mac;
+	
+	if ($is_Windows) {
+		$s_eol = "\r\n";
+		$bad_eol_sequences = array("'\r[^\n]'","'[^\r]\n'"); 
+	} elseif ($is_Mac) {
+		$s_eol = "\r";
+		$bad_eol_sequences = array("'\r\n'","'[^\r]\n'"); 
+	} else {
+		$s_eol = "\n";
+		$bad_eol_sequences = array("'\r\n'","'\r[^\n]'"); 
+	}
+	
 	if( $headers == '' ) {
-		$headers = "MIME-Version: 1.0\n" .
-			"From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" . 
-			"Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
+		$headers = "MIME-Version: 1.0" . $s_eol .
+			"From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . $s_eol . 
+			"Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"" . $s_eol;
 	}
+	else
+		$headers = preg_replace($bad_eol_sequences, $s_eol, $headers);
+	
+	$message = preg_replace($bad_eol_sequences, $s_eol, $message);
 
 	return @mail($to, $subject, $message, $headers);
 }
Index: wp-includes/vars.php
===================================================================
--- wp-includes/vars.php	(revision 4275)
+++ wp-includes/vars.php	(working copy)
@@ -34,6 +34,9 @@
 $is_apache = ( strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') || strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') ) ? 1 : 0;
 $is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0;
 
+$is_Windows = 'WIN' == strtoupper(substr(PHP_OS, 0, 3) ? 1 : 0;
+$is_Mac = 'MAC' == strtoupper(substr(PHP_OS, 0, 3) ? 1 : 0;
+
 // if the config file does not provide the smilies array, let's define it here
 if (!isset($wpsmiliestrans)) {
 	$wpsmiliestrans = array(

