폼메일발송 문의드립니다. 채택완료
미스터고
9년 전
조회 4,399
</p><p><?php</p><p>header('Content-Type: text/html; charset=utf-8');</p><p>// Check for empty fields</p><p>if(empty($_POST['name']) ||</p><p> empty($_POST['email']) ||</p><p> empty($_POST['phone']) ||</p><p> empty($_POST['message']) ||</p><p> empty($_POST['bit']) ||</p><p> empty($_POST['money']) ||</p><p> !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))</p><p> {</p><p> echo "No arguments Provided!";</p><p> return false;</p><p> }</p><p> </p><p>$name = $_POST['name'];</p><p>$email_address = $_POST['email'];</p><p>$phone = $_POST['phone'];</p><p>$bit = $_POST['bit'];</p><p>$money = $_POST['money'];</p><p>$message = $_POST['message'];</p><p> </p><p> </p><p>// Create the email and send the message</p><p>$to = '내이메일@내이메일.com'; // Add your email address inbetween the '' replacing yourname@yourdomain.com - This is where the form will send a message to.</p><p>$email_subject = "Website Contact Form: $name";</p><p>$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";</p><p>$headers = "From: noreply@yourdomain.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply@yourdomain.com.</p><p>$headers .= "Reply-To: $email_address";</p><p>$mail = false;</p><p>//$mail = mail($to,$email_subject,$email_body,$headers);</p><p>if($mail) { ?></p><p><script></p><p>alert('메일을 전송 했습니다.');</p><p>history.go(-1);</p><p></script></p><p><?php } else { ?></p><p><script></p><p>alert('메일 전송에 문제가 있습니다. 관리자에게 문의 바랍니다.');</p><p>histroy.go(-1);</p><p></script></p><p><?php } ?></p><p>
이메일 발송이 않되고 있습니다.
어느부분이 문제일까요??
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
답변에 대한 댓글 4개
�
미스터고
9년 전
�
미스터고
9년 전
http://sir.kr/g5_skin/7365?sfl=wr_subject%7C%7Cwr_content&stx=%EB%A0%88%EC%9D%B4&page=3#c_10892
이 스킨사용중입니다.
이 스킨사용중입니다.
�
달콤별
9년 전
//$mail = mail($to,$email_subject,$email_body,$headers);
앞에 주석을 제거하세요.
$mail = mail($to,$email_subject,$email_body,$headers);
앞에 주석을 제거하세요.
$mail = mail($to,$email_subject,$email_body,$headers);
�
미스터고
9년 전
주석처리해도 안되고 있네요 혹시 메일에서 설정해야 하는게 있나요??
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
아님 지메일을 사용하는데 지메일쪽에서 설정해야 하는 부분이 있을까요??