diff --git a/lib/opCommunityTopicToolKit.class.php b/lib/opCommunityTopicToolKit.class.php index 17a5f33..ce1bc82 100644 --- a/lib/opCommunityTopicToolKit.class.php +++ b/lib/opCommunityTopicToolKit.class.php @@ -43,19 +43,20 @@ static public function sendNotificationMail(Community $community, $id, $type, $n $member = $r->getMember(); $memberPcAddress = $member->getConfig('pc_address'); $memberMobileAddress = $member->getConfig('mobile_address'); - $from = self::getPostMailAddress('mail_community_'.$type.'_comment_create', array( - 'id' => $id, - 'hash' => $member->getMailAddressHash(), - )); if ($r->getIsReceiveMailPc() && $memberPcAddress) { + $from = opConfig::get('admin_mail_address'); $params['url'] = app_url_for('pc_frontend', '@community'.ucfirst($type).'_show?id='.$id, true); opMailSend::sendTemplateMail('notifyCommunityPosting', $memberPcAddress, $from, $params); } if ($r->getIsReceiveMailMobile() && $memberMobileAddress) { + $from = self::getPostMailAddress('mail_community_'.$type.'_comment_create', array( + 'id' => $id, + 'hash' => $member->getMailAddressHash(), + )); $params['url'] = app_url_for('mobile_frontend', '@community'.ucfirst($type).'_show?id='.$id, true); opMailSend::sendTemplateMail('notifyCommunityPosting', $memberMobileAddress, $from, $params); }