Copy
<?phpheader('Content-Type: text/html; charset=utf-8');// Check for empty fieldsif(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 [email protected] - 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: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected].$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개 / 댓글 4개
채택된 답변
+20 포인트
ysnet
2016-06-15 (수) 18:27:44
//$mail = mail($to,$email_subject,$email_body,$headers);
주석처리 되어있네요.
답변에 대한 댓글 4개
2016-06-15 (수) 20:03:17
2016-06-15 (수) 20:15:26
http://sir.kr/g5_skin/7365?sfl=wr_subject%7C%7Cwr_content&stx=%EB%A0%88%EC%9D%B4&page=3#c_10892
이 스킨사용중입니다.
이 스킨사용중입니다.
2016-06-15 (수) 22:10:53
//$mail = mail($to,$email_subject,$email_body,$headers);
앞에 주석을 제거하세요.
$mail = mail($to,$email_subject,$email_body,$headers);
앞에 주석을 제거하세요.
$mail = mail($to,$email_subject,$email_body,$headers);
답변을 작성하려면 로그인이 필요합니다.
아님 지메일을 사용하는데 지메일쪽에서 설정해야 하는 부분이 있을까요??