1:1 게시판 새글 이메일 알림

문제점이 발견되어 다시 질문 드립니다.

고객이 문의를 달았을 때만 메일이 와야 하는데, 관리자가 답글을 달아주었을 때도 메일이 오네요.....

관리자가 답글을 달았을 때는 메일이 오면 안될거같습니다.

혹시 설정 방법이 있는지요?

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
  • 안녕하세요~^^

    최신글 이메일 알림에 관리자가 쓴 글을 제외시키려면

    FTP로 접속해서 /wp-content/plugins/kboard/class/KBContent.class.php 파일에

    아래의 코드를 찾아서

    if($board->meta->latest_alerts){
    		if(!class_exists('KBMail')){
    			include_once 'KBMail.class.php';
    		}
    		/*
    		 * http://www.cosmosfarm.com/threads/document/3025
    		 * 메일 제목에 게시글이 등록된 게시판 이름 추가해서 보낸다.
    		 */
    		$url = new KBUrl();
    		$mail = new KBMail();
    		$mail->to = explode(',', $board->meta->latest_alerts);
    		$mail->title = apply_filters('kboard_latest_alerts_subject', '['.__('KBoard new document', 'kboard').'] '.$board->board_name.' - '.$this->title, $this);
    		$mail->content = apply_filters('kboard_latest_alerts_message', $this->content, $this);
    		$mail->url = $url->getDocumentRedirect($this->uid);
    		$mail->url_name = __('Go to Homepage', 'kboard');
    		$mail->send();
    	}
    	
    	// 게시글 입력 액션 훅 실행
    	do_action('kboard_document_insert', $this->uid, $this->board_id, $this, $board);
    }

    아래의 코드로 교체해보시겠어요?

    if($board->meta->latest_alerts && !$board->isAdmin()){
    		if(!class_exists('KBMail')){
    			include_once 'KBMail.class.php';
    		}
    		/*
    		 * http://www.cosmosfarm.com/threads/document/3025
    		 * 메일 제목에 게시글이 등록된 게시판 이름 추가해서 보낸다.
    		 */
    		$url = new KBUrl();
    		$mail = new KBMail();
    		$mail->to = explode(',', $board->meta->latest_alerts);
    		$mail->title = apply_filters('kboard_latest_alerts_subject', '['.__('KBoard new document', 'kboard').'] '.$board->board_name.' - '.$this->title, $this);
    		$mail->content = apply_filters('kboard_latest_alerts_message', $this->content, $this);
    		$mail->url = $url->getDocumentRedirect($this->uid);
    		$mail->url_name = __('Go to Homepage', 'kboard');
    		$mail->send();
    	}
    	
    	// 게시글 입력 액션 훅 실행
    	do_action('kboard_document_insert', $this->uid, $this->board_id, $this, $board);
    }

    고맙습니다.

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기