Make WordPress Core

Changeset 3214


Ignore:
Timestamp:
11/25/2005 10:57:26 PM (21 years ago)
Author:
matt
Message:

Better email from, fixes #1532

File:
1 edited

Legend:

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

    r3143 r3214  
    111111        if( $headers == '' ) {
    112112                $headers = "MIME-Version: 1.0\n" .
    113                         "From: " . get_settings('admin_email') . "\n" .
     113                        "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" .
    114114                        "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
    115115        }
     
    265265        $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";
    266266
    267         $admin_email = get_settings('admin_email');
     267        $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
    268268
    269269        if ( '' == $comment->comment_author ) {
    270                 $from = "From: \"$blogname\" <$admin_email>";
     270                $from = "From: \"$blogname\" <$wp_email>";
    271271                if ( '' != $comment->comment_author_email )
    272272                        $reply_to = "Reply-To: $comment->comment_author_email";
    273273        } else {
    274                 $from = "From: \"$comment->comment_author\" <$admin_email>";
     274                $from = "From: \"$comment->comment_author\" <$wp_email>";
    275275                if ( '' != $comment->comment_author_email )
    276276                        $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>";
Note: See TracChangeset for help on using the changeset viewer.