폼메일발송 문의드립니다.

폼메일발송 문의드립니다.

QA

폼메일발송 문의드립니다.

본문


<?php
header('Content-Type: text/html; charset=utf-8');
// Check for empty fields
if(empty($_POST['name'])      ||
   empty($_POST['email'])     ||
   empty($_POST['phone'])     ||
   empty($_POST['message'])   ||
   empty($_POST['bit'])     ||
   empty($_POST['money'])   ||
   !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
   {
   echo "No arguments Provided!";
   return false;
   }
 
$name = $_POST['name'];
$email_address = $_POST['email'];
$phone = $_POST['phone'];
$bit = $_POST['bit'];
$money = $_POST['money'];
$message = $_POST['message'];
 
 
// Create the email and send the message
$to = '내이메일@내이메일.com'; // Add your email address inbetween the '' replacing *** 개인정보보호를 위한 이메일주소 노출방지 *** - This is where the form will send a message to.
$email_subject = "Website Contact Form:  $name";
$email_body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email_address\n\nPhone: $phone\n\nMessage:\n$message";
$headers = "From: *** 개인정보보호를 위한 이메일주소 노출방지 ***\n"; // This is the email address the generated message will be from. We recommend using something like *** 개인정보보호를 위한 이메일주소 노출방지 ***.
$headers .= "Reply-To: $email_address";
$mail = false;
//$mail = mail($to,$email_subject,$email_body,$headers);
if($mail) { ?>
<script>
alert('메일을 전송 했습니다.');
history.go(-1);
</script>
<?php } else { ?>
<script>
alert('메일 전송에 문제가 있습니다. 관리자에게 문의 바랍니다.');
histroy.go(-1);
</script>
<?php } ?>

 

이메일 발송이 않되고 있습니다.

어느부분이 문제일까요??

이 질문에 댓글 쓰기 :

답변 1

//$mail = mail($to,$email_subject,$email_body,$headers); 

주석처리 되어있네요.

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

회원로그인

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