File name: welboard2/include/mailadmin.sub (1,452 bytes) Text file viewer v1.2
    1 : /* file: mailadmin.sub
    2 : 
    3 :    게시물 작성 알림 email 부 프로그램 (author: 서광현)
    4 : 
    5 :    Copyright (c) 2001/03/25 by Wesoft
    6 :    All Rights Reserved.
    7 : */
    8 : 
    9 : MAIL_FORM=
   10 : {[{&
   11 :     board_url= "http://" ~ getenv("SERVER_NAME")
   12 :              ~ strchange(getenv("SCRIPT_NAME"), "write.wel", "board.wel")
   13 :              ~ "?db=" ~ db;
   14 :     cwd= getcwd();
   15 :     if(new_attfile=="") real_attfile= "";
   16 :       else real_attfile= " (" ~ real_attfile ~ ")";
   17 :  }
   18 : Return-Path: {$board_admin_email}
   19 : From: Welboard2
   20 : Reply-To: {$to_email}
   21 : X-Mailer: {$PROGRAM_NAME} {$PROGRAM_VERSION}
   22 : To: {$to_email}
   23 : Subject: {$wname}님이 [{$board_name}]에 글을 작성했습니다.
   24 : 
   25 : 1. 게시판  URL: {$board_url}
   26 : 2. 게시판 경로: {$cwd}
   27 : 3. 게시판 이름: {$board_name} , 데이터베이스 이름: {$db}
   28 : 4. 작성자: {$wname} , email: {$wemail}
   29 : 5. 작성정보: {$wdtime}  ({$wip}) {$whost}
   30 : 6. 게시물 제목: {$subject}{?*!attfile,{!goto start_content}}
   31 : 7. 첨부파일: {$attfile}{$real_attfile}{:start_content}
   32 : ----------------------------<< 내용 시작 >>----------------------------
   33 : {$content}
   34 : -----------------------------<< 내용 끝 >>-----------------------------
   35 : ]}
   36 : 
   37 : function send_mail(string to_email)
   38 :  {
   39 :     fp= popen("/usr/lib/sendmail -t", "w");
   40 :     if(fp==FILE_OPEN_ERR) return;
   41 :     fprint(fp, strform(MAIL_FORM));
   42 :     pclose(fp);
   43 :     return;
   44 :  }
   45 : 
   46 : if(board_admin_email!="") send_mail(board_admin_email);
   47 : if(board_admin_email2!="") send_mail(board_admin_email2);
   48 : if(board_admin_email3!="") send_mail(board_admin_email3);
   49 : return;
File name: welboard2/include/mailadmin.sub (1,452 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.