From 98945dd8b421bbf7926937b85e940a741d1945e2 Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 11 Nov 2005 00:07:39 +0000 Subject: [PATCH] Use reply-to instead of from to stop acting spammy - fixes #1593 git-svn-id: http://svn.automattic.com/wordpress/trunk@3035 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index 760efb2024..f741119277 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -282,11 +282,17 @@ function wp_notify_postauthor($comment_id, $comment_type='') { $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"; $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n"; - if ('' == $comment->comment_author_email || '' == $comment->comment_author) { - $from = "From: \"$blogname\" '; - } else { - $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>"; - } + $admin_email = get_settings('admin_email'); + + if ( '' == $comment->comment_author ) { + $from = "From: \"$blogname\" <$admin_email>"; + if ( '' != $comment->comment_author_email ) + $reply_to = "Reply-To: $comment->comment_author_email"; + } else { + $from = "From: \"$comment->comment_author\" <$admin_email>"; + if ( '' != $comment->comment_author_email ) + $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>"; + } $message_headers = "MIME-Version: 1.0\n" . "$from\n"