묻고답하기


폼메일을 홈페이지에 달려고 합니다.
성공은 했는데, 한가지 고민이 생겨서 글을 올려요.
다름이 아니라, 받는 메일이 저에게만 올 수 있도록 주소를 고정하고 싶습니다.
그런데 어떤것을 고쳐야 할 지 모르겠네요.





아래쪽은 그 소스구요. 물론 별은 뺍니다^^
모쪼록 아시는 분은 꼭 도와주셨음 좋겠어요. 부탁드립니다.
그럼 오늘도 좋은하루 되세요!






<★html>
<★head>
<★meta http-equiv='Content-Type' content='text/html; charset=euc-kr'>
<★STYLE TYPE="text/css">
<★!--
A:link {text-decoration:none; color:darkblue}
A:visited{text-decoration:none; color:663399}
A:hover {text-decoration:none; color:red}
A:active {text-decoration:none; color:red}
td {font-size:9pt}
-->
<★/STYLE>

<★/head>
<★body bgcolor='#FFFFFF'>
<★center>
<★?
// Sendmail 폼
if(!$mailsend)
{
?>
<★/center>
<★form method='post' enctype='multipart/form-data' action='index.php?mailsend=send'>
<★p style="line-height:100%; margin-top:0; margin-bottom:0;" align="center"><★img src="images/h1.gif" width="400" height="25" border="0"><★center>
<★table width="399" border="1" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="white" bordercolorlight="#CCCCCC" >
<★tr>
<★td width="42" align="left" nowrap bgcolor="#EAEAEA">
<★tt> 이 름<★/font><★/span><★/tt>
<★/td>
<★td align="left" width="347">

<★font><★/font>
<★/td>
<★/tr>
<★tr>
<★td width="42" align="left" nowrap bgcolor="#EAEAEA">
<★tt><★span style="font-size:9pt;"><★font face="굴림체"> 메 일<★/font><★/span><★/tt>
<★/td>
<★td align="left" width="347">

<★font><★input name=to size="48" style="border-color:rgb(204,204,204); border-style:none;">
<★/td>
<★/tr>
<★/table>

<★p style="line-height:100%; margin-top:0; margin-bottom:0;" align="center"><★img src="images/h2.gif" width="400" height="25" border="0"><★center>

<★table width="398" border="1" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="white" bordercolorlight="#CCCCCC" >
<★tr>
<★td width="40" align="left" nowrap bgcolor="#EAEAEA">
<★tt><★span style="font-size:9pt;"> 이 름<★/font><★/span><★/tt>
<★/td>
<★td align="left" width="348">

<★font><★/font>
<★/td>
<★/tr>
<★tr>
<★td width="40" align="left" nowrap bgcolor="#EAEAEA">
<★tt> 메 일<★/font><★/span><★/tt>
<★/td>
<★td align="left" width="348">

<★font>
<★/td>
<★/tr>
<★tr>
<★td width="40" align="left" nowrap bgcolor="#EAEAEA">

<★p style="line-height:100%; margin-top:0; margin-bottom:0;"><★tt><★span style="font-size:9pt;"><★font face="굴림체"> 제 목<★/font><★/span>
<★/td>
<★td align="left" width="348">


<★ p style="line-height:100%; margin-top:0; margin-bottom:0;"><★ font><★input name=subject size="48" style="border-color:rgb(204,204,204); border-style:none;"><★/font>
<★/td>
<★/tr>
<★tr>
<★td width="40" align="left" nowrap bgcolor="#EAEAEA">
<★tt> 내 용<★/font><★/span><★/tt>
<★/td>
<★td align="left" width="348">



<★textarea name=message rows="14" cols="46" style="border-color:rgb(204,204,204); border-style:none;"><★/textarea>


<★/td>
<★/tr>
<★tr>
<★td width="40" align="left" nowrap bgcolor="#EAEAEA" rowspan="3" height="63">
<★tt><★span style="font-size:9pt;"> 첨 부<★/font><★/span><★/tt>
<★/td>
<★td align="left" width="348">
<★input type=file size="34" name=userfile style="border-color:rgb(204,204,204); border-style:none;">

<★/td>
<★/tr>
<★tr>
<★td align="left" width="348">
<★input type=file size="34" name=userfile2 style="border-color:rgb(204,204,204); border-style:none;">
<★/td>
<★/tr>
<★tr>
<★td align="left" width="348" height="9">
<★input type=file size="34" name=userfile3 style="border-color:rgb(204,204,204); border-style:none;">
<★/td>
<★/tr>
<★tr>
<★td colspan=2 align=center width="392" bgcolor="white">
<★input type=submit name=submit value='메일전송' style="background-color:white; border-color:rgb(204,204,204); border-style:none;">
<★/td>
<★/tr>
<★/table>
<★/form>

<★tt><★span style="font-size:9pt;"><★font face="굴림체">Copyright 2002' Bell5Works
allreserved. Bell5Works-sendmail_v1.0<★/font><★/span><★/tt><★/center>

<★p>

}


// 메일 프로그램 시작
if($mailsend==send)
{
// 에러
if(!$to || !$subject)
{
echo("
<★script>
window.alert('받는 사람의 메일주소나 제목은 반드시 입력해 주시기 바랍니다.')
history.go(-1)
<★/script>
");
}
else
{
// 받는 사람 처리
$to = $to_name." <★".$to.">";

// 헤더부분
$mailheader .= "Return-Path: $fromrn";
$mailheader .= "From: $from_name <$from>rn";
$mailheader .= "X-Mailer: Gfew Interfacern";

// 첨부화일이 3개일경우
if ($userfile && $userfile_size && $userfile2 && $userfile2_size && $userfile3 && $userfile3_size)
{
$filename=basename($userfile_name);
$fp = fopen($userfile,"r");
$file = fread($fp,$userfile_size);
fclose($fp);
$filename2=basename($userfile2_name);
$fp2 = fopen($userfile2,"r");
$file2 = fread($fp2,$userfile2_size);
fclose($fp2);
$filename3=basename($userfile3_name);
$fp3 = fopen($userfile3,"r");
$file3 = fread($fp3,$userfile3_size);
fclose($fp3);

if ($userfile_type == "" && $userfile2_type == "" && $userfile3_type == "")
{
$userfile_type = "application/octet-stream";
$userfile2_type = "application/octet-stream";
$userfile3_type = "application/octet-stream";
}
$boundary = "--------" . uniqid("part");
$mailheader .= "MIME-Version: 1.0rn";
$mailheader .= "Content-Type: multipart/mixed; boundary="$boundary"";
$messages = "This is a multi-part message in MIME format.rnrn";
$messages .= "--$boundaryrn";
$messages .= "Content-Type: text/html; charset=euc-krrn";
$messages .= "Content-Transfer-Encoding: 8bitrnrn";
$messages .= nl2br(addslashes($message)) . "rn";
$messages .= "--$boundaryrn";
$messages .= "Content-Type: $userfile_type; name="$filename"rn";
$messages .= "Content-Transfer-Encoding: base64rnrn";
$messages .= ereg_replace("(.{80})","\1rn",base64_encode($file));
$messages .= "rn--$boundary" . "rn";
$messages .= "Content-Type: $userfile2_type; name="$filename2"rn";
$messages .= "Content-Transfer-Encoding: base64rnrn";
$messages .= ereg_replace("(.{80})","\1rn",base64_encode($file2));
$messages .= "rn--$boundary" . "rn";
$messages .= "Content-Type: $userfile3_type; name="$filename3"rn";
$messages .= "Content-Transfer-Encoding: base64rnrn";
$messages .= ereg_replace("(.{80})","\1rn",base64_encode($file3));
$messages .= "rn--$boundary" . "rn";
}
//첨부화일이 2개일경우
elseif ($userfile && $userfile_size && $userfile2 && $userfile2_size)
{
$filename=basename($userfile_name);
$fp = fopen($userfile,"r");
$file = fread($fp,$userfile_size);
fclose($fp);
$filename2=basename($userfile2_name);
$fp2 = fopen($userfile2,"r");
$file2 = fread($fp2,$userfile2_size);
fclose($fp2);


if ($userfile_type == "" && $userfile2_type == "")
{
$userfile_type = "application/octet-stream";
$userfile2_type = "application/octet-stream";
}
$boundary = "--------" . uniqid("part");
$mailheader .= "MIME-Version: 1.0rn";
$mailheader .= "Content-Type: multipart/mixed; boundary="$boundary"";
$messages = "This is a multi-part message in MIME format.rnrn";
$messages .= "--$boundaryrn";
$messages .= "Content-Type: text/html; charset=euc-krrn";
$messages .= "Content-Transfer-Encoding: 8bitrnrn";
$messages .= nl2br(addslashes($message)) . "rn";
$messages .= "--$boundaryrn";
$messages .= "Content-Type: $userfile_type; name="$filename"rn";
$messages .= "Content-Transfer-Encoding: base64rnrn";
$messages .= ereg_replace("(.{80})","\1rn",base64_encode($file));
$messages .= "rn--$boundary" . "rn";
$messages .= "Content-Type: $userfile2_type; name="$filename2"rn";
$messages .= "Content-Transfer-Encoding: base64rnrn";
$messages .= ereg_replace("(.{80})","\1rn",base64_encode($file2));
$messages .= "rn--$boundary" . "rn";
}
//첨부화일이 1개일경우
elseif($userfile && $userfile_size)
{
$filename=basename($userfile_name);
$fp = fopen($userfile,"r");
$file = fread($fp,$userfile_size);
fclose($fp);
if ($userfile_type == "")
{
$userfile_type = "application/octet-stream";
}
$boundary = "--------" . uniqid("part");
$mailheader .= "MIME-Version: 1.0rn";
$mailheader .= "Content-Type: multipart/mixed; boundary="$boundary"";
$messages = "This is a multi-part message in MIME format.rnrn";
$messages .= "--$boundaryrn";
$messages .= "Content-Type: text/html; charset=euc-krrn";
$messages .= "Content-Transfer-Encoding: 8bitrnrn";
$messages .= nl2br(addslashes($message)) . "rn";
$messages .= "--$boundaryrn";
$messages .= "Content-Type: $userfile_type; name="$filename"rn";
$messages .= "Content-Transfer-Encoding: base64rnrn";
$messages .= ereg_replace("(.{80})","\1rn",base64_encode($file));
$messages .= "rn--$boundary" . "rn";
}

//첨부화일이 없을경우
else
{
$mailheader .= "Content-Type: text/html; charset=euc-krrn";
$mailheader .= "Content-Transfer-Encoding: 8bitrnrn";

$messages = $mail_head."rn";
$messages .= nl2br(addslashes($message))."rn";
$messages .= $mail_tail."rn";
}
mail($to,$subject,$messages,$mailheader);

echo("

");
}
}

// 메일 전송
if($mailsend==choice)
{
echo("
<★table width=$table_width border=0>
<★tr>
<★td height=20>
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
coko Install에 대하여 [2] file 2014.06.06 by 퍼니엑스이
청소년출입가능지역의족장 익스플로러와 크롬 글꼴차이 file  
이런이런88 바로 밑에 글 첨부 파일 올려 드립니다! [8] file 2014.06.06 by 이런이런88
늘푸른나무2 XE1.7.5.1에서 게시글 첨부파일이 잘 올라가나요? [2] 2014.06.06 by 늘푸른나무2
청소년출입가능지역의족장 모바일 버전 관련 질문(중요) [2] file 2014.06.06 by 키스투엑스이
han211 DB에서 xe_menu 에 '비우기'를 눌러버렸습니다. [1] 2014.06.06 by 키스투엑스이
Jacobox xe 설치 후 경로 변경 관련하어 질문합니다 [3] 2014.06.06 by 키스투엑스이
이민주986 XE 메뉴 문제 [1] file 2014.06.06 by sejin7940
junjang 쉬운설치 오류 [1] 2014.06.06 by Luatic™
이런이런88 도와주세요! 슬라이딩 배너가 웹사이트와 모바일에서 사이즈가 틀리게 나와요! file  
도로로1 특정회원 닉네임노출 [1] 2014.06.07 by JS0913
SSMIN 회원가입이 안되는 문제. [5] 2014.06.07 by SSMIN
xe초보자 resend_auth_mail.html 해결하신분 계신가요? [2] 2014.06.07 by HSJI
너마늘위해 이메일 강제변경 문의 [2] 2014.06.07 by 너마늘위해
수정원 출석부...최근게시물에 안떠요 [1] 2014.06.07 by 소시덕분에힘받아요
네니요 형님들 글 작성시 자동 댓글 기능을 어떻게해야할까요? [3] 2014.06.07 by GG
너마늘위해 여기 왜 밑줄들이 가는걸까요 ... [7] file 2014.06.07 by 너마늘위해
88번타자 카테고리별 관리자들에게 SMS전송을 하고 싶습니다. [3] 2014.06.07 by Double'U'
junjang 홈페이지 어드민 로그인이 안대요 [2] 2014.06.07 by Double'U'
Bitsnut 1.7.5.1 버전에서 회원정보 동기화가 안되는 문제 [2] 2014.06.07 by Bitsnut
푸주간 관리자 로그인시 "존재하지 않는 아이디".... [3] 2014.06.07 by 퍼니엑스이
Bitsnut {$lang->skip_to_content} 의 역할이 뭐죠? [2] 2014.06.07 by Bitsnut
신비의불 여백 테두리가 생깁니다. [2] file 2014.06.07 by 신비의불
가을풍경 101 오류(net::ERR_CONNECTION_RESET): 연결이 재설정되었습니다. [1] file 2014.06.07 by Luatic™
김삿갓계곡펜션6 게시판 관리자 로긴이 안되는데 도와주세요! [1] 2014.06.07 by JS0913
putty 위젯 활용 질문이요 (최신글을 1개만 불러오는 방법) [2] 2014.06.07 by putty
puppy99 이거 복원해야하는건가요? 제발 알려주세요 급해요 ㅠㅠㅠㅠ [2] file 2014.06.07 by puppy99
아나까떼 XE를 외부프로그램 컨테이너에서 접근하고싶습니다 [2] 2014.06.07 by 아나까떼
qqwqqw1212 댓글을 달아야 본문 내용 읽기 [2] 2014.06.07 by qqwqqw1212
상큼하게 스케치북 회원화면에 작성글, 작성 댓글 숫자 나타내게 하는 방법은?? file