메일이 게시판에서는 다 정상적으로 가는데요...제가 따로 만든..페이지에선 안가는데. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

메일이 게시판에서는 다 정상적으로 가는데요...제가 따로 만든..페이지에선 안가는데. 정보

메일이 게시판에서는 다 정상적으로 가는데요...제가 따로 만든..페이지에선 안가는데.

첨부파일

formmail.skin.contacts.php (4.8K) 125회 다운로드 2006-04-07 04:08:09

본문

안녕하세요..
 
제가 팝업이 아닌 웹페이지에서 그누 폼메일이 갈수 있도록,
페이지 하나를 만들어봤어요...
 
근데 메일이 안가네요..
 
일반 게시판에서는 다 잘 가거든요..
 
고수님들 제 폼메일 스킨 소스 한번만 봐주시와요~~ ^^
 
감사합니다...
꾸벅!!
  • 복사

댓글 전체

제가 아래 링크의 프로그램을 가지고 해보고 올려드릴께요

http://www.sir.co.kr/bbs/board.php?bo_table=self_program&wr_id=3553&sca=%EF%BF%BD%D7%B4%EF%BF%BD4%C8%A3%C8%AF&page=2
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 팝업 616x480 - 폼메일 페이지
?>

<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" width="100%"  align="center">
  <tr>
    <td width="100%">

      <!-- 컨텐츠 시작 -->
   
 <table style="border-collapse:collapse;" cellpadding="5" cellspacing="0" width="540" align="center">
              <tr><td width="540" height="5"></td></tr>
         
 <form name="fformmail" method="post" action="javascript:fformmail_submit(document.fformmail);" enctype="multipart/form-data">

            <tr height="25">
                <td width="20%" align="left"><b>수신자</b></td>

                <td width="80%">
                    <input type="hidden" name="attach" value="2">
                      <select name="email" class="select1"  required itemname='이메일'>
<option value='' selected>선택</option>
              <option value='*** 개인정보보호를 위한 이메일주소 노출방지 ***'>담임목사</option>
   
           
            </select>

     
      <input type="hidden" name="attach" value="2">
                  <br>
            </td></tr>
        </table>

         

            <table style="border-collapse:collapse;" cellpadding="5" cellspacing="0" width="540" align="center">
              <tr><td width="540" height="5"></td></tr>
              <? if ($is_member) { // 회원이면 ?>
              <input type='hidden' name='fnick'  value='<?=$member[mb_nick]?>'>
              <input type='hidden' name='fmail'  value='<?=$member[mb_email]?>'>

              <? } else { ?>
              <tr height="25">
                <td width="20%" align="left"><b>발신자</b></td>
                <td width="80%"><input type=text name='fnick' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required minlength=2 itemname='이름'>

  <br></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>발신자 이메일</b></td>
                <td width="80%"><input type=text name='fmail' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required email itemname='E-mail'>
  <br>     
</td>
              </tr height="25">
              <? } ?>
              <tr height="25">
                <td width="20%" align="left"><b>제목</b></td>
                <td width="80%"><input type=text name='subject' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required itemname='제목'></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b></b></td>
                <td width="80%"><input type='radio' name='type' value='0' checked> Text <input type='radio' name='type' value='1' > Html <input type='radio' name='type' value='2' > Text+Html</td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>내용</b></td>
                <td width="80%"><textarea name="content" rows='9' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required itemname='내용'></textarea></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>첨부화일1</b></td>
                <td width="80%"><input type=file name='file1' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;"></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>첨부화일2</b></td>
                <td width="80%"><input type=file name='file2' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;"></td>
              </tr>
            </table>
       

      <table width=100%><tr>
          <td height="40" align="center">
            <input id=btn_submit type=image src="<?=$member_skin_path?>/img/btn_send.gif" border="0">
            <a href="javascript:window.close();"><img src="<?=$member_skin_path?>/img/btn_close.gif" border="0"></a>
          </td>
        </tr>
      </form>
      </table>
      <!-- 컨텐츠 끝 -->

    </td>
  </tr>
 </table>

<script language="JavaScript">
with (document.fformmail) {
    if (typeof fname != "undefined")
        fname.focus();
    else if (typeof subject != "undefined")
        subject.focus();
}

function fformmail_submit(f)
{
    if (f.file1.value || f.file2.value) {
        // 4.00.11
        if (!confirm("첨부파일의 용량이 큰 경우 전송시간이 오래 걸립니다.\n\n메일보내기가 완료되기 전에 창을 닫거나 새로고침 하지 마십시오."))
            return;
    }

    document.getElementById('btn_submit').disabled = true;

    f.action = "./bbs/formmail_send.contacts.php";
    f.submit();
}
</script>
formmail_send.contacts.php 내용중에

$to = base64_decode($to);  를

$to = $email; 로 바꾸시면 됩니다.
그리고 위의 화일 액션 부분의

 f.action = "./bbs/formmail_send.contacts.php";


 f.action = "./formmail_send.contacts.php";  로 바꾸세요.....
그리고 formmail_send.contacts.php 의 하단에
alert_close("메일을 정상적으로 발송하였습니다.");가 있다면


alert("메일을 정상적으로 발송하였습니다.",$g4[path]); 로 바꾸시면 메인 페이지로 돌아갑니다....
참...메일을 제가 오늘 보았는데 해결은 하셨는지요?.....
해결되지 않으셨다면 테스트아이디와 비번 하고 링크를 쪽지로 주세요.....
아무래도 보아야 할듯 합니다.
제가 회원관련 테스트 할 여건이 안되네요....
네잎 클로버님 도와 주셔서 너무 감사해요... 열심히 가르쳐주시는데루 했는데 잘 안되네요..
아참..  f.action = "./bbs/formmail_send.contacts.php"; 이부분은 맞는것 같은데.... 암튼, 시간나시는데루 도와 주셔서 감사합니다.....*^^*
formmail_skin.contacts.php 입니다...

<?
include_once("./_common.php");
include_once("$g4[path]/_head.php");
?>

<table style="border-collapse:collapse;" cellpadding="0" cellspacing="0" width="100%"  align="center">
  <tr>
    <td width="100%">

      <!-- 컨텐츠 시작 -->
   
 <table style="border-collapse:collapse;" cellpadding="5" cellspacing="0" width="540" align="center">
              <tr><td width="540" height="5"></td></tr>
         
 <form name="fformmail" method="post" action="javascript:fformmail_submit(document.fformmail);" enctype="multipart/form-data">

            <tr height="25">
                <td width="20%" align="left"><b>수신자</b></td>

                <td width="80%">
                    <input type="hidden" name="attach" value="2">
                      <select name="email" class="select1"  required itemname='이메일'>
<option value='' selected>선택</option>
              <option value='*** 개인정보보호를 위한 이메일주소 노출방지 ***';>담임목사</option>
   
           
            </select>

     
                  <br>
            </td></tr>
        </table>

         

            <table style="border-collapse:collapse;" cellpadding="5" cellspacing="0" width="540" align="center">
              <tr><td width="540" height="5"></td></tr>
              <? if ($is_member) { // 회원이면 ?>
              <input type='hidden' name='fnick'  value='<?=$member[mb_nick]?>'>
              <input type='hidden' name='fmail'  value='<?=$member[mb_email]?>'>

              <? } else { ?>
              <tr height="25">
                <td width="20%" align="left"><b>발신자</b></td>
                <td width="80%"><input type=text name='fnick' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required minlength=2 itemname='이름'>

  <br></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>발신자 이메일</b></td>
                <td width="80%"><input type=text name='fmail' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required email itemname='E-mail'>
  <br>     
</td>
              </tr height="25">
              <? } ?>
              <tr height="25">
                <td width="20%" align="left"><b>제목</b></td>
                <td width="80%"><input type=text name='subject' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required itemname='제목'></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b></b></td>
                <td width="80%"><input type='radio' name='type' value='0' checked> Text <input type='radio' name='type' value='1' > Html <input type='radio' name='type' value='2' > Text+Html</td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>내용</b></td>
                <td width="80%"><textarea name="content" rows='9' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;" required itemname='내용'></textarea></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>첨부화일1</b></td>
                <td width="80%"><input type=file name='file1' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;"></td>
              </tr>
              <tr height="25">
                <td width="20%" align="left"><b>첨부화일2</b></td>
                <td width="80%"><input type=file name='file2' style="width:95%; border-width:1; border-color:rgb(204,204,204); border-style:solid;"></td>
              </tr>
            </table>
       

      <table width=100%><tr>
          <td height="40" align="center">
            <input id=btn_submit type=image src="<?=$member_skin_path?>/img/btn_send.gif" border="0">
            <a href="<?=$g4[path]?>"><img src="<?=$member_skin_path?>/img/btn_close.gif" border="0"></a>
          </td>
        </tr>
      </form>
      </table>
      <!-- 컨텐츠 끝 -->

    </td>
  </tr>
 </table>

<script language="JavaScript">
with (document.fformmail) {
    if (typeof fname != "undefined")
        fname.focus();
    else if (typeof subject != "undefined")
        subject.focus();
}

function fformmail_submit(f)
{
    if (f.file1.value || f.file2.value) {
        // 4.00.11
        if (!confirm("첨부파일의 용량이 큰 경우 전송시간이 오래 걸립니다.\n\n메일보내기가 완료되기 전에 창을 닫거나 새로고침 하지 마십시오."))
            return;
    }

    document.getElementById('btn_submit').disabled = true;

    f.action = "./formmail_send.contacts.php";
    f.submit();
}
</script>

<?
include_once("$g4[path]/_tail.php");
?>
formamil_send.contacts.php 입니다.


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

referer_check();


$to = $email;



for ($i=1; $i<=$attach; $i++)
{
    if ($_FILES["file".$i][name])
        $file[] = attach_file($_FILES["file".$i][name], $_FILES["file".$i][tmp_name]);
}

$content = stripslashes($content);
if ($type == 2)
{
    $type = 1;
    $content = preg_replace("/\n/", "<br>", $content);
}

// html 이면
if ($type)
{
    $current_url = $g4[url];
    $mail_content = "<html><head><meta http-equiv='content-type' content='text/html; charset=$cfg[charset]'><title>메일보내기</title><link rel='stylesheet' href='$current_url/style.css' type='text/css'></head><body>$content</body></html>";
}
else
    $mail_content = $content;

//mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file, $cfg[charset]);
mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);

//$html_title = $tmp_to . "님께 메일발송";
$html_title = "메일 발송중";
include_once("$g4[path]/head.sub.php");

alert("메일을 정상적으로 발송하였습니다.",$g4[path]);

include_once("$g4[path]/tail.sub.php");
?>
여러가지 일로 무척이나 바쁘실텐데, 시간내주셔서 너무 감사해요.. ㅠㅠ
지금 너무 잘 되네요.. 드디어.. 됩니다.. ^^

정말 진심으로 감사드리구요... 이 자료를 꼭 팁앤 테크에 올려주세요~~~~

자유게시판에 예쁜 딸 잘 보았습니다...자고 있는 저희 아가 한테도 뽀뽀를 해주고 싶은...ㅋㅋㅋ

암튼, 좋은 하루 보내세요!!!

너무 감사합니다~~~~~~
© SIRSOFT
현재 페이지 제일 처음으로