묻고답하기



소스는

http://www.nzeo.com/bbs/zboard.php?id=p_qa_new&page=1&sn1=&divpage=4&category=1&sn=off&ss=on&sc=off&keyword=폼메일&select_arrange=headnum&desc=asc&no=19057

최지헌 님이 올리내용입니다.    


최지헌님이 올린 소스입니다. 아래
항목을 추가했는데 보내고 확인해 보면 이름, 이메일 주소, 제목밖에 표시 안되네요.

소스
스크린샷은 링크파일-


----------------------mail.php---------------------------

<html>
<head>
<title>메일 발송</title>
</head>
<body bgcolor="white" text="black" link="black" vlink="black" alink="black">
<form method='post' action='send.php'>

<table border="0" cellpadding="0" cellspacing="0" width="392" align="center">
<tr><td width="392">

                

<span style="font-size:9pt;">
어쩌구

</span>

</table>
<table border="0" cellpadding="0" cellspacing="0" width="392" align="center">
<td width="392">
                

<span style="font-size:9pt;">성명
                </td><td><input type="text" name="name" maxlength="10" size="10" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">발신자 이메일 주소</span>   </td><td><input type="text" name="frommail" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">소속, 직위</span>   </td><td><input type="text" name="grade" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">전화번호</span>   </td><td><input type="text" name="phone" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">팩스번호</span>   </td><td><input type="text" name="fax" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">주소</span>   </td><td><input type="text" name="where" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">수신자 이메일 주소</span>  
                 </td><td><input type="text" name="tomail" maxlength="35" size="35" style="color:black;" value="css3135@yahoo.co.kr" readonly>
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">제목</span>  </td><td>
                <input type="text" name="subject" maxlength="35" size="35" style="color:black; ">

</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="392" align="center">
<tr>
<td width="392">
                

<textarea name="body" rows="8" cols="53" style="color:black;"></textarea>


              
</td>
</tr>
<tr>
<td width="392">

<input type="submit" value="메일보내기">  <input type="reset" value="  취  소  ">
                      

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

</html>


---------------------------send.php-------------------------
<?
function error($text){
echo "
<script language=javascript>
window.alert('$text')
history.go(-1)
</script>";
exit;
}

function msg($text){
echo "
<script language=javascript>
window.alert('$text')
</script>
<meta http-equiv='refresh' content='0;url=mail.php'>";
exit;
}


if (!$name) {error('성명을 적어주십시오.');}  // 이름이 없을때 에러 메세지
if(!ereg("@",$frommail)) {error('올바른 발신자 이메일 주소를 적어주십시오.');} // 보내는 메일주소나 @이 없으면 나오는 에러메세지
if (!$grade) {error('소속, 직위를 적어주십시오.');}
if (!$phone) {error('전화번호를 적어주십시오.');}
if (!$fax) {error('팩스번호를 적어주십시오.');}
if (!$where) {error('주소를 적어주십시오.');}
if(!ereg("@",$tomail)) {error('올바른 수신자 이메일 주소를 적어주십시오.');} // 받는 메일주소나 @이 없으면 나오는 에러메세지
if (!$subject) {error('제목을 적어주십시오.');} // 제목을 안적으면 나오는 에러 메세지.
if (!$body) {error('내용을 적어주십시오.');} // 내용을 안적으면 나오는 에러 메세지

$mailheaders .= "Return-Path: $frommail rn"; // 메일 헤더
$mailheaders .= "From: $name <$frommail>rn"; // 메일헤더, 이름과 email 주소가 나오게 함..

$result=mail($tomail , $subject , $body , $mailheaders); // 메일 함수

if($result){msg('메일이 성공적으로 발송되었습니다.');} // 성공하면 나오는 메제시
else{error('메일 발송에 실패하였습니다.');} // 편지가 전달되지 않으면 나오는 함수

?>


이 소스 하단에 보면  최지헌님이 다시 글을 올려 놓았습니다.

스스로 해결 하셨다고...하면서...올린 내용은

$result=mail($tomail , $subject , $body=$grade.$phone.$fax.$where , $mailheaders);

수정해서 되었다고 하셔서..제가 따라 해봤는데.. 안되더군요.


제가 똑같이 따라 했는데도    받는사람은 내용이 전혀 보여지질 않습니다.
아신다면 수정 방법을 자세히 좀 알려 주시면 감사하겠습니다.

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
첫느낌그대로 그룹아이콘 출력 보고 지나치지마시구... 꼭좀 답변주세요 ;;  
reform 댓글이 나타나질않네요 외그런가요... [1] 2009.08.29 by reform
guny 레이어형 버튼(링크)의 필요성 [1] 2009.08.29 by 채준배
우디홍 레이아웃을 수정하다보면 갑자기 상단에 10px정도 공간이......??? [3] 2009.08.29 by 우디홍
강정환 시작모듈 삭제후 제어판이 안먹습니다. [4] 2009.08.29 by 강정환
張漢 JW Player for Silverlight - 제로xe 에 적용 문의  
오진우 1차메뉴가 어떻게 잘못된건지 하나를 클릭하면 두개가 뜹니다. [2] 2009.08.29 by 오진우
이건형 글쓰기 창에 html 소스가 자동으로 뜹니다.  
워나트 닉네임 클릭시 팝업메뉴 수정 [1] 2009.08.29 by 金东峰
바이블인사이드 아 근데 백성찬님 한가지 예외사항이 있겠네요.. 이럴땐 혹시.. [6] 2009.08.29 by 바이블인사이드
jkphoto 사진등록시 에러 [5] 2009.08.29 by 金东峰
한마디 khongchi님 보십시오. [1] 2009.08.29 by khongchi
한마디 백성찬님, 보십시오. [2] file 2009.08.29 by 한마디
다크호스 게시판 위젯 추가시 제목 입력란이 안나와요. [2] 2009.08.29 by 다크호스
폼첩쿤 알 FTP로 1.2.0버전에서 1.2.4버전으로 업로드중 입니다. 오류발생. [3] file 2009.08.29 by 폼첩쿤
bibleinside 텍스타일 생성했는데 첫화면이 관리자페이네요 여기서 어디로 가야 블로구화면으로 넘어가나요? [26] 2009.08.29 by 바이블인사이드
dalbeat 확장변수도 검색엔진 로봇이 검색하는지.. [1] 2009.08.29 by 백성찬
윤은택 최근이미지 출력에서요...... [2] 2009.08.29 by 윤은택
sunny15 게시판 서버이전 문의 드립니다  
YO-DA 보드 스킨 view_document.html은 어디에서 비롯되어 나타나는 것인지요? [1] 2009.08.29 by YO-DA