bucuo123 发表于 2019-4-5 14:46:00

Discuz sendmail函数实现 发表回帖邮件通知楼主方法

Discuz sendmail函数实现 发表回帖邮件通知楼主方法
            
            打开目录:source\include\post
找到文件:post_newreply.php
找到下面代码:
       
               
                       
                               
if(!isset($inspacecpshare)) {
                showmessage($return , $url] $modpost->param('showmsgparam'));
      }
                       
               
       
在这段代码之前添加如下代码:
       
               
                       
                               
if($firstpost['author', != $_G['uid',){
    $tomail = reset(C::t('common_member')->fetch_all_by_username($firstpost['author',));
    $mail_subject = '您的帖子有新回复!';
    $mail_message =
                        
                              
                                       
                                                


                                                 |
                                       
                              
                        
               
               
                        尊敬的DZ起点网会员:{$firstpost['author',}
有新网友回复了您在起点网发布的帖子《》
详情请点击这里打开查看:http://www.dz7.com.cn/discuz-{$firstpost['tid',}-1-1.html。
DZ起点网,您的坚强后盾!
               
               
                        

               
               
                        

   如有任何疑问,可以添加DZ起点网站长QQ、微信进行咨询!
               
               
                        每一位DZ起点网的会员人,都在默默无闻的,帮助着新手站长朋友快速成长,解决站长朋友们在建站过程中的疑问!
-- DZ起点网
      
EOT;
    if(!function_exists('sendmail')) {
      include libfile('function/mail');
    }
    sendmail($tomail['email',, $mail_subject, $mail_message);
      }
复制代码
                       
               
       
即可实现回帖邮件通知楼主!
页: [1]
查看完整版本: Discuz sendmail函数实现 发表回帖邮件通知楼主方法