글 작성 후 발송되는 알림 이메일의 '발신인'을 입력받은 값으로 설정하고 싶습니다.

1. 정확한 제품 또는 플러그인 이름

kboard 

 

2. 상세 내용

https://www.cosmosfarm.com/threads/document/61028 에 남긴 글 입니다!

알려주신 필터와 아래 제가 작성한 function 을 같이 사용할 경우 

add_filter('wp_mail_from_name', 'custom_wp_mail_from_name', 10, 1);
	function custom_wp_mail_from_name($original_email_from){
		return '홈페이지상담문의';
	}

	add_filter('kboard_latest_alerts_subject', 'my_kboard_latest_alerts_subject', 10, 2);
	function my_kboard_latest_alerts_subject($title, $content){
		$title = '[문의] ' . $content->member_display . '님이 남겨주신 문의글 입니다.';
		return $title;
	}

	add_filter('kboard_latest_alerts_message', 'my_kboard_latest_alerts_message', 10, 2);
	function my_kboard_latest_alerts_message($mail_content, $content){
		if($content->board_id == '1'){
			$option = '<strong>회사명 :</strong> ' . $content->option->{'company'} . '<br><hr>';
			$option .= '<strong>이름 :</strong> ' . $content->member_display . '<br><hr>';
			$option .= '<strong>직책 :</strong> ' . $content->option->{'position'} . '<br><hr>';
			$option .= '<strong>지역 :</strong> ' . $content->option->{'loca'} . '<br><hr>';
			$option .= '<strong>사이트주소 :</strong> ' . $content->option->{'homepage'} . '<br><hr>';
			$option .= '<strong>연락처 :</strong> ' . $content->option->{'tel'} . '<br><hr>';
			$option .= '<strong>이메일 :</strong> ' . $content->option->{'email'} . '<br><hr>';
			$option .= '<strong>관심있는 서비스 : </strong>';
			if ($content->option->{'service'}){ $option .= $content->option->{'service'} . '/'; }
			if ($content->option->{'service01'}){ $option .= $content->option->{'service01'} . '/'; }
			if ($content->option->{'service02'}){ $option .= $content->option->{'service02'} . '/'; }
			if ($content->option->{'service03'}){ $option .= $content->option->{'service03'} . '/'; }
			if ($content->option->{'service04'}){ $option .= $content->option->{'service04'} . '/'; }
			if ($content->option->{'service05'}){ $option .= $content->option->{'service05'}; }
			$option .= '<hr>';
			$option .= '<strong>가나다 :</strong> ' . $content->option->{'before'} . '<br><hr>';
			$option .= '<strong>라마바 :</strong> ' . $content->option->{'budget'} . '<br><hr>';
			$option .= '<strong>사아자 :</strong> ' . $content->option->{'talk_info'} . '<br><hr>';

			//$mail_content = $option . '<strong>문의내용 : </strong>' . $mail_content;
			$mail_content = $option;
			return  $mail_content;
		}
		return $mail_content;
	}

 

오류가 나는데요!

같이 사용할 경우 어떻게 작성해야할지 도와주시면 감사하겠습니다 ㅠㅠ

 

 

3. 확인 가능한 상세 페이지 주소

 

 

4. 수정한 코드 내역 (있다면)

 

 

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