自动发邮件 使用了这个类http://bbs.php100.com/read-htm-tid-121431.html
因他用的php版本较老,用到了函数ereg_replace() 和 ereg()

立即学习“PHP免费学习笔记(深入)”;
解决方法
1ereg_replace() 函数,替换为 strtr() 函数
语法不同点如下:

立即学习“PHP免费学习笔记(深入)”;
详情http://www.php.net/manual/zh/function.ereg-replace.php
立即学习“PHP免费学习笔记(深入)”;

专为中小型企业定制的网络办公软件,富有竞争力的十大特性: 1、独创 web服务器、数据库和应用程序全部自动傻瓜安装,建立企业信息中枢 只需3分钟。 2、客户机无需安装专用软件,使用浏览器即可实现全球办公。 3、集成Internet邮件管理组件,提供web方式的远程邮件服务。 4、集成语音会议组件,节省长途话费开支。 5、集成手机短信组件,重要信息可直接发送到员工手机。 6、集成网络硬
详情http://www.w3school.com.cn/php/func_string_strtr.asp
立即学习“PHP免费学习笔记(深入)”;
2ereg() 函数,替换为 preg_match() 函数

立即学习“PHP免费学习笔记(深入)”;
链接http://blog.163.com/yanli_xu/blog/static/1363672912011420101820393/
preg_match() 函数语法http://www.php.net/manual/zh/function.preg-match.php
立即学习“PHP免费学习笔记(深入)”;
修改完毕后,完整代码如下
【邮件类】sm.class.php

smtp( = "", = 25, = ,, ->debug = ->smtp_port = ->relay_host = ->time_out = 30; ->auth = ; ->user = ->pass = ->host_name = "localhost"; ->log_file = "" ->sock = sendmail(, , = "", = "", , = "", = "", = "" = ->get_address(->strip_comment( = (, "(^|(\r\n))(\.)", "\1.\3" .= "MIME-Version:1.0\r\n" (=="HTML" .= "Content-Type:text/html\r\n" .= "To: ".."\r\n" ( != "" .= "Cc: ".."\r\n" .= "From: .">\r\n" .= "Subject: ".."\r\n" .= .= "Date: ".("r")."\r\n" .= "X-Mailer:By Redhat (PHP/".().")\r\n" (, ) = (" ", .= "Message-ID: ("YmdHis", ).".".(