WordPress.org

Make WordPress Core

Changeset 10575


Ignore:
Timestamp:
02/15/2009 01:31:43 PM (9 years ago)
Author:
westi
Message:

Add documentation to detail reasoning for default from address. See #5007 props pishmishy

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r10553 r10575  
    160160    $email = $user->user_email;
    161161    $name = $user->user_login;
    162     $message_headers = 'From: "' . $blog_title . '" <wordpress@' . $_SERVER['SERVER_NAME'] . '>';
    163162    $message = sprintf(__("Your new WordPress blog has been successfully set up at:
    164163
     
    176175"), $blog_url, $name, $password);
    177176
    178     @wp_mail($email, __('New WordPress Blog'), $message, $message_headers);
     177    @wp_mail($email, __('New WordPress Blog'), $message);
    179178}
    180179endif;
  • trunk/wp-includes/pluggable.php

    r10541 r10575  
    329329    }
    330330
    331     // If we don't have an email from the input headers
     331    /* If we don't have an email from the input headers default to wordpress@$sitename
     332     * Some hosts will block outgoing mail from this address if it doesn't exist but
     333     * there's no easy alternative. Defaulting to admin_email might appear to be another
     334     * option but some hosts may refuse to relay mail from an unknown domain. See
     335     * http://trac.wordpress.org/ticket/5007.
     336     */
     337   
    332338    if ( !isset( $from_email ) ) {
    333339        // Get the site domain and get rid of www.
     
    340346    }
    341347
    342     // Set the from name and email
     348    // Plugin authors can override the potentially troublesome default
    343349    $phpmailer->From = apply_filters( 'wp_mail_from', $from_email );
    344350    $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name );
Note: See TracChangeset for help on using the changeset viewer.