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:
parent
39e9a6d942
commit
49cb88b7c0
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue