지메일로 폼메일 수신이 안되는 이유?

지메일로 폼메일 수신이 안되는 이유?

QA

지메일로 폼메일 수신이 안되는 이유?

본문


<form name="contactform" method="post" action="send.php">
                    <input type="hidden" name="이메일" value="이메일 주소가 입력되어있습니다." />
                    <table>
                        <tr>
                            <th>성명</th>
                            <td><input type='text' name="user_name" id="user_name" placeholder="성함을 입력해주세요." autocomplete="off" /></td>
                        </tr>
                        <tr>
                            <th>핸드폰 번호</th>
                            <td><input type='tel' name="전화번호" id="user_phone" placeholder="'-'을 제외한 숫자만 입력해주세요." autocomplete="off" maxlength="11" /></td>
                        </tr>
                        <tr>
                            <th>문의사항</th>
                            <td><textarea name="상담내용" id="user_comment" placeholder="상담받으실 내용을 입력해주세요." autocomplete="off"></textarea></td>
                        </tr>
                    </table>
                    <div class="agree_text">
                        개인정보 수집 및 이용목적<br><br>
                        1. 수집하는 개인정보 항목<br>
                        회사는 관심고객등록 등을 통하여 아래와 같은 개인정보를 수집하고 있습니다.<br>
                        - 수집항목 : 이름, 핸드폰 번호<br>
                        - 수집방법 : 홈페이지 관심고객등록<br><br>
                        2. 개인정보의 수집 및 이용목적 <br>
                        회사는 수집한 개인정보를 다음의 목적을 위해 활용합니다.<br>
                        - 분양정보 및 분양상담 등 문의 처리<br>
                        - 마케팅 및 광고홍보에 활용<br><br>
                        3. 개인정보의 보유 및 이용기간 <br>
                        회사는 개인정보수집 및 이용목적이 달성된 후에는 예외 없이 해당정보를 지체없이 파기합니다.
                    </div>
                    <label class="agree_btn">
                        개인정보수집에 동의함 <input type="checkbox" name="개인정보보호정책동의" value="동의함" />
                    </label>
                    <div class="btn_confirm">
                        <button>관심고객 등록하기</button>
                    </div>
                </form>

 

send.php


<meta charset="utf-8">
<?php
if(isset($_POST['이메일'])) {
     
    
    $email_to = "이메일 주소가 입력되어있습니다."; 
    $email_subject = "상담 문의드립니다.";
    $email_subject = '=?UTF-8?B?'.base64_encode($email_subject).'?=';
     
     
    function died($error) {
        // your error code can go here
        echo "<script> alert('메일발송을 실패하였습니다.');";
        echo "history.go(-1);";
        echo "</script>";
        die();
    }
     
    $user_name = $_POST['user_name'];
    $email_from = $_POST['이메일'];
    $telephone = $_POST['전화번호'];
    $comments = $_POST['상담내용'];
    $email_message = "";
    
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }
     
    $email_message .= "이름 : ".clean_string($user_name)."\n\n";
    $email_message .= "연락처 : ".clean_string($telephone)."\n\n";
    $email_message .= "상담내용 : ".clean_string($comments)."\n\n";
     
     
// create email headers
$headers = 'From: '.$email_from;
// 제목이 깨질경우 아래 캐릭터셋 적용
@mail($email_to, $email_subject, $email_message, $headers);  
?>
 
<!-- include your own success html here -->
 
<script>
alert ("메일이 발송되었습니다.\n빠른 시일안에 답변드리겠습니다.");
history.go(-1);
</script>
 
<?php
}
?>

 

지메일은 수신이 안되는 이유가 뭘까요?

이 질문에 댓글 쓰기 :

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

회원로그인

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