WordPress.org

Make WordPress Core

Changeset 1733


Ignore:
Timestamp:
10/04/2004 07:44:04 AM (17 years ago)
Author:
saxmatt
Message:

Use mb_mail_send if available.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/users.php

    r1702 r1733  
    9696    $message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
    9797
    98     @mail(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
     98    @wp_mail(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
    9999    header('Location: users.php');
    100100break;
  • trunk/wp-includes/functions.php

    r1728 r1733  
    10041004        . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
    10051005
    1006     @mail($user->user_email, $subject, $notify_message, $message_headers);
     1006    @wp_mail($user->user_email, $subject, $notify_message, $message_headers);
    10071007   
    10081008    return true;
     
    10471047        . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
    10481048
    1049     @mail($admin_email, $subject, $notify_message, $message_headers);
     1049    @wp_mail($admin_email, $subject, $notify_message, $message_headers);
    10501050   
    10511051    return true;
     
    17971797}
    17981798
     1799
     1800function wp_mail($to, $subject, $message, $headers = '', $more = '') {
     1801    if ( function_exists('mb_send_mail') )
     1802        return mb_send_mail($to, $subject, $message, $headers, $more);
     1803    else
     1804        return mail($to, $subject, $message, $headers, $more);
     1805}
     1806
    17991807?>
  • trunk/wp-login.php

    r1732 r1733  
    149149    $message .= get_settings('siteurl') . '/wp-login.php';
    150150
    151     $m = mail($user_email, sprintf(__("[%s] Your login and password"), get_settings('blogname')), $message);
     151    $m = wp_mail($user_email, sprintf(__("[%s] Your login and password"), get_settings('blogname')), $message);
    152152
    153153    if ($m == false) {
     
    159159        echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
    160160        // send a copy of password change notification to the admin
    161         mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user_login));
     161        wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user_login));
    162162        die();
    163163    }
  • trunk/wp-register.php

    r1667 r1733  
    104104    $message  = sprintf(__("New user registration on your blog %1\$s:\n\nLogin: %2\$s \n\nE-mail: %3\$s"), get_settings('blogname'), $user_login, $user_email);
    105105
    106     @mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message);
     106    @wp_mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message);
    107107
    108108    ?>
Note: See TracChangeset for help on using the changeset viewer.