Define message header if blank.

git-svn-id: https://develop.svn.wordpress.org/trunk@1760 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Donncha O Caoimh 2004-10-08 11:52:23 +00:00
parent ad7e0b673b
commit e2c540b1dd
1 changed files with 9 additions and 1 deletions

View File

@ -1871,7 +1871,15 @@ function htmlentities2($myHTML) {
function wp_mail($to, $subject, $message, $headers = '', $more = '') {
if ( function_exists('mb_send_mail') )
{
if( $headers == '' )
{
$headers = "MIME-Version: 1.0\r\n" .
"From: " . $to . " <" . $to . ">\r\n" .
"Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
}
return mb_send_mail($to, $subject, $message, $headers, $more);
}
else
return mail($to, $subject, $message, $headers, $more);
}