<?php
/**
* mail 功能
*/
function emailto($From, $To, $subject, $message)
{
$headers = "MIME-Version: 1.0/r/n";
$headers .= "Content-type: text/html; charset=UTF-8/r/n";
$headers .= "From: $From/nReply-To: $From/nX-Mailer: PHP/".phpversion();
$bool = mail($To, encodeMIMEString ("UTF-8", $subject), $message, $headers);
return $bool;
}
/**
* 信件標題編碼
*/
function encodeMIMEString ($enc, $string)
{
return "=?$enc?B?".base64_encode($string)."?=";
}
php mail函数 subject乱码
最新推荐文章于 2024-06-22 10:16:32 发布