묻고답하기



소스는

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 남기남
정성용 잘하시는 분들께 물어봅니다.[수정] [1] 2007.08.10
오재호 노프레임에 관한 질문좀 드립니다.... [3] 2007.08.10
오재호 안녕하세요..상업적인 홈페이지를 만들려고 하는데요.. [2] 2007.08.10
스피언트 게시판에서 번호 이어지게 하는 법.. [1] 2007.08.10
박병언 폰트 다운받을때 말이죠... [1] 2007.08.10
치키니aaa 패턴인가요? 알려주세요.. [1] 2007.08.10
이현아 ★★★ 폼 메일 관련 질문 입니다. ( 소스 있습니다) [1] 2007.08.10
젠틀버그 의미전달 분명하게 다시 문합니다... 아이프레임과 링크시키기...꼭알려주세요 ㅜ_ㅜ [4] 2007.08.10
인자기 WIN2000서버 터미널에 관한 질문  
나두몰라 링크 관련 [1] 2007.08.10
모진형 플레시에 대해서 질문 있습니다.  
모진형 저기 MySQL에 대해서 묻고 싶은것이 있는데요... [1] 2007.08.10
위피 가로스크롤은 없앴는데, 여백과 크기는 영아니네요 ㅠ.ㅠ;; 도와주세요 고수님들 제발 ㅠ.ㅠ [1] 2007.08.10
안진오 windows 2003 에서 php 설정하는거 좀 알려주세요~!! [3] 2007.08.10
로크 이건 진짜 모르겠다.. [1] 2007.08.10
모진형 MySQL 관리 하고 싶은데...phpmyadmin으로 하고 있는데요.. [3] 2007.08.10
쉬드 [강추]프레임셋 스크롤바 관련~ [1] 2007.08.10
이정원 BGM 플레이어 소스  
sul 위치가 일정하지 않아요.. 이유를 알수가 없네요.. ㅡ.ㅜ;  
토민쿠 이거 무슨 폰트체인지 아시는분 [1] 2007.08.10
이운호 서브 메뉴 이거든요? 메뉴 글자크기 조정하는거요...  
강남주 고수님들께 질문드립니다.(꼭 가르쳐주세요^^) [3] 2007.08.10
Charlie Kim 홈페이지 내용물 복사 방지 Please help me. [3] 2007.08.10
다로 플래쉬 무비 클립에 링크걸기 에 대한 질문 [1] 2007.08.10
이은석 이폰트가 무슨 폰트 인가요? [2] 2007.08.10
치키니aaa 이거 어떻게 만드나요?[내용참조]] [2] 2007.08.10
이성훈 태그 경로를 도저히 못찾겟어요..ㅠ.ㅠ  
최오규 흠.. 인코딩 문제인것 같은데요.... [1] 2007.08.10
후후-ㅅ- 포토샵에서 펜툴 사용할때요..  
박진경 DB아이디 [1] 2007.08.10