帝国CMS修改步骤:
1.文件修改e/enews/index.php 找到如下代码
上方加入如下代码:
view plaincopy to clipboardprint?
//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.文件上传 FeedMail.php 文件上传到 e/trylife/Mail/
(如无此文件夹请建立)
3.FeedMail.php文件代码示例
内容:
--------------------------------------------------------------------------------------
{$_POST['saytext']}
--------------------------------------------------------------------------------------
IP:$ip
";
//执行发信
$sm=EcmsToSendMail($email,$subject,$text);
?>
other1.发件人修改 e/class/SendEmail.inc.php
这个是修改发件人的EMAIL是反馈者留的邮箱地址,方便回复邮件到反馈人的邮箱
//$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 防止字符过滤不严被利用 需要修改上述代码
里面$_POST['字段']这样的改为RepPostVar($_POST['字段'])
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: 帝国CMS二次开发把反馈内容发送到邮箱的代码