帝国CMS修正过程:
1.文件修正e/enews/index.php 找到如下代码
上方参加如下代码:
viewplaincopytoclipboardprint? //trylifeaddforfeedmail elseif($enews=='AddFeedback'){ include('../class/q_functions.php'); include('../class/SendEmail.inc.php'); include('../trylife/Mail/FeedMail.php'); } //trylifeaddforfeedmail 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文件代码示例
<?php /*********************************************************************************** 代码示例:(假定反应字段为以下四个字段) 标题:title 名字:name 电话:call 内容:saytext *************************************************************************************/ //获得IP地址 $ip=egetip(); //需求发送的邮箱 //$email='827216443@qq.com'; //多邮件示例 $email=array("827216443@qq.com","trylife@qq.com","94592590@qq.com"); //$subject为邮件标题 $subject='[Service.trylife.cn信息反应]'.$_POST['title']; //$text为邮件内容{$_POST['title']}为反应字段中title字段内容以此类推 $text=" 标题:{RepPostVar($_POST['title'])} 名字:{RepPostVar($_POST['name'])} 电话:{RepPostVar($_POST['call'])} <b>内容:</b> -------------------------------------------------------------------------------------- {$_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['字段'])
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!
原文地址:帝国CMS二次开发反馈内容发送到邮箱发布于2022-06-07 07:43:39