필드에서 입력받은 e-mail 로 게시글 등록시 발송하려고 합니다. 채택완료
Copy
<?php if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가////////////////////////////////////////////////// 받을 사람의 이메일주소를 넣어주세요.$emails[] = "bbb@gggi.com"; // 이메일주소1$emails[] = "aaa@ggg.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 = G5_BBS_URL."/board.php?bo_table=$bo_table&wr_id=$wr_id&$qstr"; include_once(G5_LIB_PATH."/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); }} if($w != 'u') {alert("견적서가 발송되었습니다.. .\\n\\n발송내역을 확인해주세요.", G5_URL); }?>
게시판 글 작성시 이메일의 필드명은 wr_email 입니다.
위 내용은 6,7,8,9,10 번째 줄에 이메일을 입력했을때 받는사람이 정해져있는 방식인데
이걸 사용자가 만들어져있는 이메일필드에 이메일을 입력하면 필드에있는 이메일로 전송해주는 기능을 찾고 있습니다.
힌트좀 부탁드립니다..
한가지만 더 질문드릴게요
25번째 내용
$subject = "'{$board[bo_subject]}' 게시판에 글이 올라왔습니다.";
여기서의 bo_subject 를 wr_subject 로 바꾸고 싶습니다..ㅠ
답변을 작성하려면 로그인이 필요합니다.
로그인