function mymail($mto,$mcc,$msubject,$mbody)
{
$from=webmaster@backhome.com.cn;
$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;
$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);
}
http://www.bkjia.com/phpjc/315565.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/315565.htmltecharticle前一段时间我接触到dec tru64 unix 我在上面装了php+apache,可以用提供的mail函数始终不能正常发信,于是自编了一个函数,它利用unix下的管道和...
