Make WordPress Core

Changeset 3035


Ignore:
Timestamp:
11/11/2005 12:07:39 AM (21 years ago)
Author:
matt
Message:

Use reply-to instead of from to stop acting spammy - fixes #1593

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable-functions.php

    r3013 r3035  
    283283        $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";
    284284
    285         if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
    286                 $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
    287         } else {
    288                 $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>";
    289         }
     285        $admin_email = get_settings('admin_email');
     286
     287        if ( '' == $comment->comment_author ) {
     288                $from = "From: \"$blogname\" <$admin_email>";
     289                if ( '' != $comment->comment_author_email )
     290                        $reply_to = "Reply-To: $comment->comment_author_email";
     291        } else {
     292                $from = "From: \"$comment->comment_author\" <$admin_email>";
     293                if ( '' != $comment->comment_author_email )
     294                        $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>";
     295        }
    290296
    291297        $message_headers = "MIME-Version: 1.0\n"
Note: See TracChangeset for help on using the changeset viewer.