wp_maill() 修正 UTF-8 亂碼

為了避免每次更新WP就必須在30幾個檔案之內尋找wp_mail的芳蹤,紀錄一下好了。

wp-includes/pluggable-functions.php
搜尋

php · [高亮] · [原始]

  1. return @mail($to, $subject, $message, $headers);
return @mail($to, $subject, $message, $headers);

前面加上

php · [高亮] · [原始]

  1. $subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
$subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";

One Response to “wp_maill() 修正 UTF-8 亂碼”

  1. shakalaca Says:

    參考這個 plugin 看看:
    http://www.quakemachine.com/blog/php/wordpress/554/

Leave a Comment