Use mb_mail_send if available.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d4050c29e9
commit
ec34fb1d80
|
@ -95,7 +95,7 @@ case 'adduser':
|
|||
$message = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n";
|
||||
$message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
|
||||
|
||||
@mail(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
|
||||
@wp_mail(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
|
||||
header('Location: users.php');
|
||||
break;
|
||||
|
||||
|
|
|
@ -1003,7 +1003,7 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
|||
. "$from\r\n"
|
||||
. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
|
||||
|
||||
@mail($user->user_email, $subject, $notify_message, $message_headers);
|
||||
@wp_mail($user->user_email, $subject, $notify_message, $message_headers);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1046,7 +1046,7 @@ function wp_notify_moderator($comment_id) {
|
|||
. "$from\r\n"
|
||||
. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
|
||||
|
||||
@mail($admin_email, $subject, $notify_message, $message_headers);
|
||||
@wp_mail($admin_email, $subject, $notify_message, $message_headers);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1796,4 +1796,12 @@ function htmlentities2($myHTML) {
|
|||
return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($myHTML, $translation_table));
|
||||
}
|
||||
|
||||
|
||||
function wp_mail($to, $subject, $message, $headers = '', $more = '') {
|
||||
if ( function_exists('mb_send_mail') )
|
||||
return mb_send_mail($to, $subject, $message, $headers, $more);
|
||||
else
|
||||
return mail($to, $subject, $message, $headers, $more);
|
||||
}
|
||||
|
||||
?>
|
|
@ -148,7 +148,7 @@ case 'retrievepassword':
|
|||
$message .= __('Password') . ": $user_pass\r\n";
|
||||
$message .= get_settings('siteurl') . '/wp-login.php';
|
||||
|
||||
$m = mail($user_email, sprintf(__("[%s] Your login and password"), get_settings('blogname')), $message);
|
||||
$m = wp_mail($user_email, sprintf(__("[%s] Your login and password"), get_settings('blogname')), $message);
|
||||
|
||||
if ($m == false) {
|
||||
echo '<p>' . __('The e-mail could not be sent.') . "<br />\n";
|
||||
|
@ -158,7 +158,7 @@ case 'retrievepassword':
|
|||
echo '<p>' . sprintf(__("The e-mail was sent successfully to %s's e-mail address."), $user_login) . '<br />';
|
||||
echo "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
|
||||
// send a copy of password change notification to the admin
|
||||
mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user_login));
|
||||
wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user_login));
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ case 'register':
|
|||
|
||||
$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);
|
||||
|
||||
@mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message);
|
||||
@wp_mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
|
Loading…
Reference in New Issue