1.添加扩展变量
——————————————————
变量名: myemai
变量标识:欢迎邮件开关
变量说明: 1(开启) 0(关闭)
——————————————————
——————————————————
变量名: myemaititle
变量标识:欢迎邮件标题
变量说明: []:用户名 []:邮箱地址[]:发送时间 []:网站名称 []:网站地址[]:用户密码
——————————————————
——————————————————
变量名: myemaitext
变量标识:欢迎邮件内容
变量说明: []:用户名 []:邮箱地址[]:发送时间 []:网站名称 []:网站地址[]:用户密码
——————————————————
2.文件修改/e/class/user.php
查找:
01.//同一IP注册
复制代码在上方添加:
01.//密码变量复制
02.$mypassword=$password;
03.
复制代码查找:
01.//邮箱激活
复制代码在上方添加:
01.//发送欢迎邮件
02.if($public_r['add_myemai']==1)
03.{
04.include('../class/qmemberfun.php');
05.SendhuanUserEmail($userid,$username,$email,$mypassword);
06.}
07.
复制代码3.文件修改/e/class/qmemberfun.php查找:
01.//激活帐号
复制代码在上方添加:
01.//发送欢迎邮件
02.function SendhuanUserEmail($userid,$username,$email,$mypassword){
03. global $empire,$dbtbpre,$public_r,$user_tablename,$user_username,$user_userid,$user_email;
04. //发送邮件
05. $pr['title']=ReturnPublicAddVar('myemaititle');
06. $pr['text']=ReturnPublicAddVar('myemaitext');
07. @include(ECMS_PATH.'e/class/SendEmail.inc.php');
08. $textr=QMRepEmailtext($userid,$username,$email,$url,$pr['title'],$pr['text'],$mypassword);
09. $sm=EcmsToSendMail($email,$textr['title'],$textr['text']);
10.}
11.
复制代码查找:
01.//替换邮件内容变量
复制代码将下面的函数替换为:
01.function QMRepEmailtext($userid,$username,$email,$pageurl,$title,$text,$mypassword=''){
02. global $empire,$dbtbpre,$public_r;
03. $date=date("Y-m-d");
04. $r[text]=str_replace('[]',$pageurl,$text);
05. $r[text]=str_replace('[]',$username,$r[text]);
06. $r[text]=str_replace('[]',$email,$r[text]);
07. $r[text]=str_replace('[]',$date,$r[text]);
08. $r[text]=str_replace('[]',$mypassword,$r[text]);
09. $r[text]=str_replace('[]',$public_r[sitename],$r[text]);
10. $r[text]=str_replace('[]',$public_r[newsurl],$r[text]);
11. $r[title]=str_replace('[]',$pageurl,$title);
12. $r[title]=str_replace('[]',$username,$r[title]);
13. $r[title]=str_replace('[]',$email,$r[title]);
14. $r[title]=str_replace('[]',$date,$r[title]);
15. $r[title]=str_replace('[]',$mypassword,$r[title]);
16. $r[title]=str_replace('[]',$public_r[sitename],$r[title]);
17. $r[title]=str_replace('[]',$public_r[newsurl],$r[title]);
18. return $r;
19.}
复制代码修改完毕!