


Imperial CMS implements the method of sending feedback information content to the mailbox
The example of this article describes the method of sending feedback information to the mailbox by Imperial CMS. Share it with everyone for your reference. The specific implementation method is as follows:
Empire CMS modification steps:
1. File modification e/enews/index.php Find the following code, add the following code above:
The code is as follows:
//trylife add for feedmail elseif($enews=='AddFeedback'){ include('../class/q_functions.php'); include('../class/SendEmail.inc.php'); include('../trylife/Mail/FeedMail.php'); } //trylife add for feedmail elseif($enews=='AddFeedback'){ include('../class/q_functions.php'); include('../class/SendEmail.inc.php'); include('../trylife/Mail/FeedMail.php'); }
2. File upload FeedMail.php file is uploaded to e/trylife/Mail/. If there is no such folder, please create it.
3. FeedMail.php file code example :
The code is as follows:
<?php /*********************************************************************************** 代码示例:(假设反馈字段为以下四个字段) 标题:title 姓名:name 电话:call 内容:saytext *************************************************************************************/ //取得IP地址 $ip=egetip(); //需要发送的邮箱 //$email='123456789@qq.com'; //多邮件示例 $email=array("123456789@qq.com","trylife@qq.com","987654321@qq.com"); //$subject为邮件标题 $subject='[Service.trylife.cn信息反馈]'.$_POST['title']; //$text为邮件内容 {$_POST['title']}为反馈字段中title字段内容 以此类推 $text=" 标题:{RepPostVar($_POST['title'])} 姓名:{RepPostVar($_POST['name'])} 电话:{RepPostVar($_POST['call'])} 内容: {$_POST['saytext']} IP:$ip"; //执行发信 $sm=EcmsToSendMail($email,$subject,$text); ?>
Recommended to study "Empirecms Tutorial"
other1. The sender modifies e/ class/SendEmail.inc.php
This is to modify the sender's EMAIL to the email address left by the feedback person, so that it is convenient to reply to the email address of the feedback person.
The code is as follows:
//$mailer->From=$r['fromemail']; if($_POST['email']){ $mailer->From=$_POST['email']; } else{ $mailer->From=$r['fromemail']; } //$mailer->FromName=$r['emailname']; if($_POST['name']){ $mailer->FromName=$_POST['name']; } else{ $mailer->FromName=$r['emailname']; } //$mailer->From=$r['fromemail']; if($_POST['email']){ $mailer->From=$_POST['email']; } else{ $mailer->From=$r['fromemail']; } //$mailer->FromName=$r['emailname']; if($_POST['name']){ $mailer->FromName=$_POST['name']; } else{ $mailer->FromName=$r['emailname']; } //2010-06-17 防止字符过滤不严被利用 需要修改上述代码里面
The code is as follows:
$_POST['字段'] 这样的改为 复制代码 代码如下: RepPostVar($_POST['字段'])
I hope this article will be helpful to everyone’s Imperial CMS website building.
The above is the detailed content of Imperial CMS implements the method of sending feedback information content to the mailbox. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The mobile settings of Empire CMS are located in the "Mobile Template" of the "Template Management" module. The specific steps include: enabling the template, selecting the application channel, editing the template content, and saving the settings.

The Empire CMS sitemap can be found by accessing the config.inc.php file and checking the dositemap settings. If set to "on", sitemap is enabled. The sitemap path is located in the sitemapurl setting and can be accessed via a browser or downloaded via FTP.

The ideal location for the Empire CMS template file is /e/template/default/skin/default/. Secondly, it can also be placed in /e/data/skins/ and /e/skin/. You need to pay attention to maintaining the folder structure and setting file permissions. and regular backups.

The Imperial CMS database configuration file is located in the website root directory e/config/db.inc.php. It contains the following configuration information: $dbhost: database server address $dbuser: database user name $dbpass: database password $dbname: database name $dbport :Database port $dbcharset: Database character set

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

The automatic publishing interface of Empire CMS is located at /e/api/web/postinfo.php. The usage steps are as follows: visit /e/api/web/postinfo.php address and use HTTP POST to submit the article title, column ID, category ID, author and article The content and other data interfaces will return a response in JSON format, which contains the publishing results and article ID.

The imperial cms Baidu active push plug-in is located in the root directory /e/api/baidu/push.php. The specific configuration steps are as follows: 1. Upload the plug-in file to the specified path. 2. Configure the "Baidu Active Push" option in the Imperial CMS background, including push address, API Key and push interval. 3. Get Baidu push information: Push address: https://data.zz.baidu.com/urls?site=YOUR_SITE&token=YOUR_API_KEY, API Key: log in to Baidu search resource platform to obtain. 4. Update the API Key regularly and set a reasonable push interval.

Yes, Empire CMS is a free and open source content management system (CMS). It is a lightweight CMS that is feature-rich and easy to use. Empire CMS is licensed under the GNU General Public License (GPL), which means it is free to download, install and use. For commercial use, it offers a paid version that offers additional features and support such as ad management, online payments, and premium technical support.
