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

본문 바로가기
 

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

페이지 정보

작성자 휴먼 댓글 0건 조회 10,825회 작성일 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건 1 페이지
Board Tip 목록
번호 제목 글쓴이 조회 날짜
59 휴먼 13522 05-29
58 휴먼 12098 06-11
57 휴먼 7444 06-11
56 휴먼 17456 06-11
55 휴먼 22234 06-11
54 휴먼 10842 06-12
53 휴먼 9411 06-13
52 휴먼 10938 06-13
51 휴먼 10929 06-13
50 휴먼 7386 06-19
49 휴먼 8587 06-19
열람중 휴먼 10826 06-19
47 휴먼 9309 07-09
46 휴먼 7985 07-16
45 휴먼 13836 11-24
44 휴먼 15400 11-24
43 휴먼 9651 11-25
42 휴먼 20187 11-25
게시물 검색