|
function mymail($mto,$mcc,$msubject,$mbody)
{
$from="webmaster@backhome.com.cn";
$sign = "/n";//隨你便寫(xiě)些什么
$sendmailpath="/usr/lib/sendmail";//Semdmail路徑
$bound = "========_".uniqid("BCFMail")."==_";//分界符
$headers = "MIME-Version: 1.0/n".
"Content-Type: multipart/mixed; boundary=/"$bound/"/n".
"Date: ".date("D, d M H:i:s Y ")."/n".
"From: $from/n".
"To: $mto/n".
"Cc: $mcc/n".
"Subject: $msubject/n".
"Status: /n".
"X-Status:/n".
"X-Mailer: MY Email Interface/n".
"X-Keywords:/n/n";
$content="--".$bound."/n"."Content-Type:text/plain;charset=/"GB2312/"/n/n".$mbody.$sign."/n";
$end = "/n"."--".$bound."--/n";
$sock = popen("$sendmailpath -t -f 'webmaster@backhome.com.cn'",'w');
fputs($sock, $headers);
fputs($sock, $content);
fputs($sock, $end);
fputs($sock, "./n");
fputs($sock, "QUIT/n");
pclose($sock);
}
php技術(shù):PHP下MAIL的另一解決方案,轉(zhuǎn)載需保留來(lái)源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。