[그누보드] 게시물 작성시 특정인에게 이메일 발송하기 > Board Tip

본문 바로가기
 

[그누보드] 게시물 작성시 특정인에게 이메일 발송하기

페이지 정보

작성자 휴먼 댓글 0건 조회 10,785회 작성일 08-06-19 19:35

본문

파일 : skin/board/사용중인스킨/write_update.skin.php

코드 :

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

////////////////////////////////////////////////
// 받을 사람의 이메일주소를 넣어주세요.

$emails[] = "test@test.com"; // 이메일주소1
$emails[] = "test2@test.com"; // 이메일주소2
$emails[] = "test3@test.com"; // 이메일주소3
$emails[] = "test4@test.com"; // 이메일주소4
$emails[] = "test5@test.com"; // 이메일주소5
$emails[] = "test6@test.com"; // 이메일주소6

// 계속 추가할 수 있습니다.
////////////////////////////////////////////////

if ($w == '')
{
    $row = sql_fetch("select * from $write_table where wr_id = '$wr_id'");

    $wr_subject = get_text(stripslashes($row[wr_subject]));

    $tmp_html = 0;
    if (strstr($row[wr_option], "html1"))
        $tmp_html = 1;
    else if (strstr($row[wr_option], "html2"))
        $tmp_html = 2;

    $wr_content = conv_content(stripslashes($row[wr_content]), $tmp_html);
    $wr_name = $row[wr_name];

    $subject = "'{$board[bo_subject]}' 게시판에 글이 올라왔습니다.";
    $link_url = "$g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$wr_id&$qstr";


    include_once("$g4[path]/lib/mailer.lib.php");

    ob_start();
    include_once ("./write_update_mail.php");
    $content = ob_get_contents();
    ob_end_clean();

    foreach($emails as $email)
    {
        if ($email)
            mailer($wr_name, $wr_email, $email, $subject, $content, 1);
    }
}
?>

댓글목록

등록된 댓글이 없습니다.

Total 59건 3 페이지
Board Tip 목록
번호 제목 글쓴이 조회 날짜
23 휴먼 11285 01-08
22 휴먼 11106 12-26
21 휴먼 11136 12-26
20 휴먼 16010 12-18
19 휴먼 10314 12-01
18 휴먼 20118 11-25
17 휴먼 9626 11-25
16 휴먼 15354 11-24
15 휴먼 13754 11-24
14 휴먼 7957 07-16
13 휴먼 9280 07-09
열람중 휴먼 10786 06-19
11 휴먼 8562 06-19
10 휴먼 7365 06-19
9 휴먼 10876 06-13
8 휴먼 10888 06-13
7 휴먼 9383 06-13
6 휴먼 10793 06-12
게시물 검색