diff -ur wordpress-current/wp-admin/users.php wordpress-working/wp-admin/users.php
--- wordpress-current/wp-admin/users.php	2004-08-22 16:24:50.000000000 -0700
+++ wordpress-working/wp-admin/users.php	2004-08-30 19:50:41.784417600 -0700
@@ -95,7 +95,7 @@
 	$message  = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n";
 	$message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
 
-	@mail(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
+	@mail_encoded(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
 	header('Location: users.php');
 break;
 

diff -ur wordpress-current/wp-includes/functions.php wordpress-working/wp-includes/functions.php
--- wordpress-current/wp-includes/functions.php	2004-08-30 00:16:40.000000000 -0700
+++ wordpress-working/wp-includes/functions.php	2004-08-30 19:49:38.645531600 -0700
@@ -982,16 +982,12 @@
 	$notify_message .= get_permalink($comment->comment_post_ID) . '#comments';
 
 	if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
-		$from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
+		$from = "\"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
 	} else {
-		$from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>";
+		$from = '"' . $comment->comment_author . "\" <$comment->comment_author_email>";
 	}
 
-	$message_headers = "MIME-Version: 1.0\r\n"
-		. "$from\r\n"
-		. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
-
-	@mail($user->user_email, $subject, $notify_message, $message_headers);
+	@mail_encoded($user->user_email, $subject, $notify_message, $from);
    
     return true;
 }
@@ -1025,13 +1021,8 @@
 
     $subject = '[' . get_settings('blogname') . '] Please approve: "' .$post->post_title.'"';
     $admin_email = get_settings("admin_email");
-    $from  = "From: $admin_email";
-
-    $message_headers = "MIME-Version: 1.0\r\n"
-    	. "$from\r\n"
-    	. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
 
-    @mail($admin_email, $subject, $notify_message, $message_headers);
+    @mail_encoded($admin_email, $subject, $notify_message, $admin_email);
     
     return true;
 }
@@ -1580,6 +1571,29 @@
 	endif;
 }
 
+function mail_encoded($to, $subject, $message, $from=''){
+
+	$charset = get_settings('blog_charset');
+ 
+	# prepare headers
+
+	$message_headers = "MIME-Version: 1.0\r\n";
+	if ($from){
+		$message_headers .= "From: $from\r\n";
+	}
+	$message_headers .= "Content-Type: text/plain; charset=\"$charset\"\r\n";
+
+
+	# escape subject
+
+	$subject = preg_replace('/([^a-z ])/ie', 'sprintf("=%02x",ord(StripSlashes("\\1")))', $subject);
+	$subject = str_replace(' ', '_', $subject);
+	$subject = "=?$charset?Q?$subject?=";
+
+
+	@mail($to, $subject, $message, $message_headers);
+}
+
 function wp_head() {
 	do_action('wp_head', '');
 }
diff -ur wordpress-current/wp-login.php wordpress-working/wp-login.php
--- wordpress-current/wp-login.php	2004-08-09 02:29:25.000000000 -0700
+++ wordpress-working/wp-login.php	2004-08-30 19:50:14.524503600 -0700
@@ -216,7 +216,7 @@
 	$message .= "Password: $user_pass\r\n";
 	$message .= 'Login at: ' . get_settings('siteurl') . '/wp-login.php';
 
-	$m = mail($user_email, '[' . get_settings('blogname') . "] Your weblog's login/password", $message);
+	$m = mail_encoded($user_email, '[' . get_settings('blogname') . "] Your weblog's login/password", $message);
 
 	if ($m == false) {
 		 echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
@@ -226,7 +226,7 @@
 		echo '<p>' .  sprintf(__("The e-mail was sent successfully to %s's e-mail address."), $user_login) . '<br />';
         echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
 		// send a copy of password change notification to the admin
-		mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user_login));
+		mail_encoded(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user_login));
 		die();
 	}
 

