Use mb_mail_send if available.

git-svn-id: https://develop.svn.wordpress.org/trunk@1733 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-10-04 07:44:04 +00:00
parent 39394f12e4
commit 1a3c14d8a9
4 changed files with 15 additions and 7 deletions

View File

@@ -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);
}
?>