[제나플러스] 게시물 작성시 특정인에게 이메일 발송하기
페이지 정보
본문
파일 : skin/board/사용중인스킨/write_update.skin.php
코드 :
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 
////////////////////////////////////////////////
// 받을 사람의 이메일주소를 넣어주세요.
$emails[] = "[email protected]"; // 이메일주소1
$emails[] = "[email protected]"; // 이메일주소2
$emails[] = "[email protected]"; // 이메일주소3
$emails[] = "[email protected]"; // 이메일주소4
$emails[] = "[email protected]"; // 이메일주소5
$emails[] = "[email protected]"; // 이메일주소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);
    }
}
?>
관련링크
댓글목록

