Fixed mangled email headers, thanks to John Allman

git-svn-id: http://svn.automattic.com/wordpress/trunk@1921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
donncha 2004-12-08 14:40:40 +00:00
parent 83e6c81f41
commit ceca2e9751
1 changed files with 9 additions and 9 deletions

View File

@ -1122,9 +1122,9 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
$from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>"; $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>";
} }
$message_headers = "MIME-Version: 1.0\r\n" $message_headers = "MIME-Version: 1.0\n"
. "$from\r\n" . "$from\n"
. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n"; . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
@wp_mail($user->user_email, $subject, $notify_message, $message_headers); @wp_mail($user->user_email, $subject, $notify_message, $message_headers);
@ -1165,9 +1165,9 @@ function wp_notify_moderator($comment_id) {
$admin_email = get_settings("admin_email"); $admin_email = get_settings("admin_email");
$from = "From: $admin_email"; $from = "From: $admin_email";
$message_headers = "MIME-Version: 1.0\r\n" $message_headers = "MIME-Version: 1.0\n"
. "$from\r\n" . "$from\n"
. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n"; . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
@wp_mail($admin_email, $subject, $notify_message, $message_headers); @wp_mail($admin_email, $subject, $notify_message, $message_headers);
@ -1944,9 +1944,9 @@ function htmlentities2($myHTML) {
function wp_mail($to, $subject, $message, $headers = '', $more = '') { function wp_mail($to, $subject, $message, $headers = '', $more = '') {
if( $headers == '' ) { if( $headers == '' ) {
$headers = "MIME-Version: 1.0\r\n" . $headers = "MIME-Version: 1.0\n" .
"From: " . $to . " <" . $to . ">\r\n" . "From: " . $to . " <" . $to . ">\n" .
"Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n"; "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
} }
if ( function_exists('mb_send_mail') ) if ( function_exists('mb_send_mail') )
return mb_send_mail($to, $subject, $message, $headers, $more); return mb_send_mail($to, $subject, $message, $headers, $more);