폼메일 발송시 보낸사람 주소가 root@로 나오는 오류
purelovecity
2년 전
조회 1,647
타 업체 호스팅을 사용하다가 카페24로 옮긴 후부터
폼메일로 문의를 작성하면 보낸사람 메일 주소가 root@uws64-044.cafe24.com 이렇게 옵니다 ㅠㅠ
원래 잘 작동되던것이고 폼 쪽은 손댄게 없어서 우선 데이터 파일만 보여드립니다
여기서 뭘 바꿔야 원래대로 잘 나올까요?ㅠ
https://sir.kr/qa/305926 이 글이 저랑 같은 오류인 것 같아서
답변해주신 방법들을 다 따라해봤는데도 안되네요...
</p>
<p><?php
//받는사람
$recipient = "abc@dfg.com";
//제목 처리
$subject = '=?UTF-8?B?'.base64_encode("[문의]".$_GET['senduser']).'?=';
//메일주소
$mail_from = '=?UTF-8?B?'.base64_encode($_GET['email']).'?=';</p>
<p>//메일내용
$mail_body = "<table width='600' border='0' cellpadding='0' cellspacing='1' bgcolor='#CCCCCC'></p>
<p> <tr>
<td width='100' height='30' align='center' bgcolor='#eeeeee'>이름</td>
<td width='400' bgcolor='#FFFFFF'>". $_GET['senduser']."</td></tr>".
" <tr>
<td width='100' height='30' align='center' bgcolor='#eeeeee'>연락처</td>
<td width='400' bgcolor='#FFFFFF'>". $_GET['phone']."</td></tr>".
" <tr>
<td width='100' height='30' align='center' bgcolor='#eeeeee'>이메일</td>
<td width='400' bgcolor='#FFFFFF'>". $_GET['email']."</td></tr>".
" <tr>
<td width='100' height='30' align='center' bgcolor='#eeeeee'>상담희망 시간</td>
<td width='400' bgcolor='#FFFFFF'>". $_GET['check']."</td></tr>".
" <tr>
<td width='100' height='30' align='center' bgcolor='#eeeeee'>문의사항</td>
<td width='400' bgcolor='#FFFFFF'>". $_GET['body']."</td></tr>".
"</table>";</p>
<p>
//메일 발송처리</p>
<p> $header = "From:$subject\n";
$header = "Content-Type: text/html;charset=UTF-8";
$header .= "From : $mail_from <".$mail_from.">\n"; </p>
<p>$ext = "-f ".$_GET['email'];
$email = mail($recipient, $subject, $mail_body, $header, $ext);</p>
<p>
if (!$email)
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <script>
window.alert('상담 신청에 실패하였습니다.');
history.go(-1);
</script>";
else
echo " <script>
window.alert('상담 신청이 정상적으로 처리되었습니다.');
history.go(-1);
</script>";
?></p>
<p>
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
답변에 대한 댓글 2개
p
purelovecity
2년 전
사이 공백을 없애라는 말씀이실까요?ㅠ
�
엑스엠엘
2년 전
예~~
혹시나 해서요.
혹시나 해서요.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인