Re-arranged where wp-mail() sets message headers

git-svn-id: http://svn.automattic.com/wordpress/trunk@1775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
donncha 2004-10-11 12:04:37 +00:00
parent 39e9a6d942
commit 49cb88b7c0
1 changed files with 4 additions and 7 deletions

View File

@ -1876,16 +1876,13 @@ function htmlentities2($myHTML) {
function wp_mail($to, $subject, $message, $headers = '', $more = '') {
if ( function_exists('mb_send_mail') )
{
if( $headers == '' )
{
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);
}
if ( function_exists('mb_send_mail') )
return mb_send_mail($to, $subject, $message, $headers, $more);
else
return mail($to, $subject, $message, $headers, $more);
}