mb_internal_encoding();
mb_send_mail();//寄出信件
以下是一般的寄件方式:
$to=$addredd;
$subject = "Re:XXX";
$message = "Your PASSWORD is:".$ps." Please change your PASSWORD.";
$from = "admin@project.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
用以上的方法會出有亂碼產生,只要修改一下,就OK了:
$to=$addredd;
$subject = "Re:XXX";
$message = "Your PASSWORD is:".$ps." Please change your PASSWORD.";
$from = "admin@project.com";
$headers = "From: $from";
mb_internal_encoding("BIG-5");//設定編碼方式
mb_send_mail($to,$subject,$message,$headers);//寄出信件
資料來源:http://www.wretch.cc/blog/Linpy/10919198
沒有留言:
張貼留言