Define message header if blank.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ff3d47b742
commit
0b10eb6d7d
|
@ -1871,7 +1871,15 @@ 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 ( function_exists('mb_send_mail') )
|
||||||
return mb_send_mail($to, $subject, $message, $headers, $more);
|
{
|
||||||
|
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
|
else
|
||||||
return mail($to, $subject, $message, $headers, $more);
|
return mail($to, $subject, $message, $headers, $more);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue