中山php|最优网络中山做网站 中山php建站

最优良人

Posts Tagged With: 乱码

php使用mail函数发送邮件,解决乱码问题

2012/06/01 at 11:03 » Comments (24)

$to = 'sales@zui88.com'; $subject = "=?UTF-8?B?".base64_encode('网站收到一个新信息')."?="; $message = " 用户姓名:{$_POST['name']}\n 用户邮箱:{$_POST['email']}\n 用户电话:{$_POST['contact']}\n 留言内容:{$_POST['content']} "; $headers = 'From: webmaster@zui88.com' . "\r\n" . 'Reply-To: webmaster@zui88.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; mail($to, $subject, $message, $headers); more »