Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ted Roche

    (@tedroche)

    after the line

    function hr_rotate(){
    change
    require (ABSPATH.'/wp-admin/custom-header.php');
    to
    require_once (ABSPATH.'/wp-admin/custom-header.php');

    Confirmed! That fixes it. Thanks!

    There’s a couple conflicting things going on here. First, wp_mail explicitly hardcodes ‘wordpress’ @ yourservername.tld in the _header_ of the email, that’s the outside envelope, but not necessarily what the recipient will see.

    function wp_mail($to, $subject, $message, $headers = ”) {
    if( $headers == ” ) {
    $headers = “MIME-Version: 1.0\n” .
    “From: ” . get_settings(‘admin_email’) . “\n” .
    “Content-Type: text/plain; charset=\”” . get_settings(‘blog_charset’) . “\”\n”;
    # was: “From: wordpress@” . preg_replace(‘#^www\.#’, ”, strtolower($_SERVER[‘SERVER_NAME’])) . “\n” .
    }

    return @mail($to, $subject, $message, $headers);
    }

    The second problem is PHP’s tendency to send mail with a “Return-Path” setting of ‘[email protected]’ or whatever the name of your name server is. You can fix that with the fix described here:

    https://drupal.org/project/returnpath

    You might be able to override this for multiple named-hosts on a server with php_value settings for each host configuration file, but I haven’t tried that.

    There’s a good chance that all of this will be moot if you upgrade to the 2.2 version.

Viewing 2 replies - 1 through 2 (of 2 total)