PHP苟MAIL돨쥼寧썩엄렘갭

2018-09-07 14:47

阅读:366

  품寧뙈珂쇌乖쌈뇰돕DEC Tru64 Unix 乖瞳?衢燃걍?HP+APACHE,옵鹿痰瓊묩돨mail변鑒迦老꼇콘攣끽랙斤,黨角菱긍죄寧몸변鑒,劍적痰UNIX苟돨밗돛뵨PHP돨SOCK변鑒쏵契랙斤,쒔법茄駱렷끽壘냥묘,苟충角늪변鑒覩덜쯤。
function mymail($mto,$mcc,$msubject,$mbody)
{
$sign = "\n";//踞콱긱畇硅痂척
$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";
fputs($sock, $headers);
fputs($sock, $content);
fputs($sock, $end);
fputs($sock, ".\n");
fputs($sock, "QUIT\n");
pclose($sock);
}


评论


亲,登录后才可以留言!