Home >CMS Tutorial >Empire CMS >What is the method to send the registration welcome email in Empire cms6.6?

What is the method to send the registration welcome email in Empire cms6.6?

藏色散人
藏色散人Original
2019-12-12 09:27:542713browse

What is the method to send the registration welcome email in Empire cms6.6?

What is the method to send the registration welcome email for Empire cms6.6?

1. Add extended variables

Variable name: myemai

Variable identification: welcome email switch

Variable description : 1 (on) 0 (off)

Variable name: myemaititle

Variable identification: welcome email title

Variable description: [!--username--]: user Name[!--email--]:Email address[!--date--]:Sending time[!--sitename--]:Website name[!--news.url--]:Website address[!- -mypassword--]: User password

Variable name: myemaitext

Variable identification: Welcome email content

Variable description: [!--username--]: Username [!--email--]:Email address[!--date--]:Sending time[!--sitename--]:Website name[!--news.url--]:Website address[!-- mypassword--]: User password

2. File modification/e/class/user.php

Search:

01.//Same IP registration

Copy the code and add it above:

01.//Copy the password variable

02.$mypassword=$password;

03.

Copy code search:

01.//E-mail activation

Copy code and add it above:

01.//Send welcome email

Copy code The code is as follows:

02.if($public_r['add_myemai']==1) 
03.{ 
04.include('../class/qmemberfun.php'); 
05.SendhuanUserEmail($userid,$username,$email,$mypassword); 
06.}

07.

Copy code 3. File modification/e/class/qmemberfun.php search:

01.//Activate account

Copy the code and add it above:

01.//Send welcome email

The code is as follows:

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.

Find :

01.//Replace the email content variable

Copy the code and replace the following function with:

The code is as follows:

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--]',$pageurl,$text); 
05. $r[text]=str_replace('[!--username--]',$username,$r[text]); 
06. $r[text]=str_replace('[!--email--]',$email,$r[text]); 
07. $r[text]=str_replace('[!--date--]',$date,$r[text]); 
08. $r[text]=str_replace('[!--mypassword--]',$mypassword,$r[text]); 
09. $r[text]=str_replace('[!--sitename--]',$public_r[sitename],$r[text]); 
10. $r[text]=str_replace('[!--news.url--]',$public_r[newsurl],$r[text]); 
11. $r[title]=str_replace('[!--pageurl--]',$pageurl,$title); 
12. $r[title]=str_replace('[!--username--]',$username,$r[title]); 
13. $r[title]=str_replace('[!--email--]',$email,$r[title]); 
14. $r[title]=str_replace('[!--date--]',$date,$r[title]); 
15. $r[title]=str_replace('[!--mypassword--]',$mypassword,$r[title]); 
16. $r[title]=str_replace('[!--sitename--]',$public_r[sitename],$r[title]); 
17. $r[title]=str_replace('[!--news.url--]',$public_r[newsurl],$r[title]); 
18. return $r; 
19.}

Copy the code and modify it !

The above is the detailed content of What is the method to send the registration welcome email in Empire cms6.6?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn