폼메일 발송시 보낸사람 주소가 root@로 나오는 오류

폼메일 발송시 보낸사람 주소가 root@로 나오는 오류

QA

폼메일 발송시 보낸사람 주소가 root@로 나오는 오류

본문

타 업체 호스팅을 사용하다가 카페24로 옮긴 후부터

폼메일로 문의를 작성하면 보낸사람 메일 주소가 root@uws64-044.cafe24.com 이렇게 옵니다 ㅠㅠ

원래 잘 작동되던것이고 폼 쪽은 손댄게 없어서 우선 데이터 파일만 보여드립니다

여기서 뭘 바꿔야 원래대로 잘 나올까요?ㅠ

https://sir.kr/qa/305926 이 글이 저랑 같은 오류인 것 같아서

답변해주신 방법들을 다 따라해봤는데도 안되네요...

 


<?php
//받는사람
  $recipient = "*** 개인정보보호를 위한 이메일주소 노출방지 ***";
//제목 처리
  $subject = '=?UTF-8?B?'.base64_encode("[문의]".$_GET['senduser']).'?=';
//메일주소
  $mail_from = '=?UTF-8?B?'.base64_encode($_GET['email']).'?=';
//메일내용
  $mail_body = "<table width='600' border='0' cellpadding='0' cellspacing='1' bgcolor='#CCCCCC'>
          <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>";
 
//메일 발송처리
  $header = "From:$subject\n";
  $header = "Content-Type: text/html;charset=UTF-8";
  $header .= "From : $mail_from <".$mail_from.">\n"; 
$ext = "-f ".$_GET['email'];
$email = mail($recipient, $subject, $mail_body, $header, $ext);

  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>";
?>

이 질문에 댓글 쓰기 :

답변 2

메서드 

get으로 쓰는 이유를 모르겠어요

post로 해야되요

$header .= "From :

여기서

From:

으로 바꿔 보세요.

답변을 작성하시기 전에 로그인 해주세요.
전체 123,157 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT