Re-arranged where wp-mail() sets message headers
git-svn-id: https://develop.svn.wordpress.org/trunk@1775 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
18585460f5
commit
24359ab0fb
|
@ -1876,16 +1876,13 @@ function htmlentities2($myHTML) {
|
||||||
|
|
||||||
|
|
||||||
function wp_mail($to, $subject, $message, $headers = '', $more = '') {
|
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" .
|
$headers = "MIME-Version: 1.0\r\n" .
|
||||||
"From: " . $to . " <" . $to . ">\r\n" .
|
"From: " . $to . " <" . $to . ">\r\n" .
|
||||||
"Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
|
"Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
|
||||||
}
|
}
|
||||||
|
if ( function_exists('mb_send_mail') )
|
||||||
return mb_send_mail($to, $subject, $message, $headers, $more);
|
return mb_send_mail($to, $subject, $message, $headers, $more);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return mail($to, $subject, $message, $headers, $more);
|
return mail($to, $subject, $message, $headers, $more);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue