폼메일 오류 !! 뭐가문제일까용..
본문
contact.php 입니다.
<form method="post" action="../../form_mail.php">
<fieldset>
<legend class="ir_pm"> 홈페이지 문의및 의견서</legend>
<div class="row form_group">
<div class="col-md-6 col-xs-12">
<span class="wpcf7-form-control-wrap text-1">
<label for="company" class="ir_pm">회사명</label>
<input type="text" name="company" id="company" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="company*">
</span>
</div>
<div class="col-md-6 col-xs-12">
<span class="wpcf7-form-control-wrap text-2">
<input type="text" name="name" id="name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="your name*">
</span>
</div>
<div class="col-md-6 col-xs-12">
<span class="wpcf7-form-control-wrap tel-1">
<input type="tel" name="phone" id="phone" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-required wpcf7-validates-as-tel" aria-required="true" aria-invalid="false" placeholder="phone*">
</span>
</div>
<div class="col-md-6 col-xs-12">
<span class="wpcf7-form-control-wrap email-1">
<input type="email" name="email" id="email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" aria-required="true" aria-invalid="false" placeholder="e-mail*">
</span>
</div>
<div class="col-md-6 col-xs-12">
<span class="wpcf7-form-control-wrap text-3">
<input type="text" name="confer" id="confer" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" placeholder="참고사이트">
</span>
</div>
<div class="col-md-6 col-xs-12">
<span class="wpcf7-form-control-wrap file-1">
<input type="file" name="file" id="file" size="40" class="wpcf7-form-control wpcf7-file" aria-invalid="false" id="file-1">
<label for="file" class="contact_label2">
<img src="http://bliart.iqv.co.kr/img/contact-file2.png">
</label>
<input type="text" class="upload_name" disabled="disabled" value="file">
</span>
</div>
<div class="con-full">
<span class="wpcf7-form-control-wrap textarea-1">
<textarea name="content" id="content" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea" aria-invalid="false" placeholder="레퍼런스 및 리뉴얼일 경우 기존 웹사이트를 함께 입력해 주시면 더욱 정확한 답변을 받으실 수 있습니다."></textarea>
</span>
</div>
<p class="map-submit">
<input type="submit" value="SEND" name="submit" class="wpcf7-form-control wpcf7-submit">
</p>
</div> <!--//form_group-->
</fieldset>
</form>
아래는 form_mail.php 입니다.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>폼메일발송 </title>
</head>
<body>
<?php
$mailTo = "*** 개인정보보호를 위한 이메일주소 노출방지 ***";
// 받는사람 메일 주소;
$mailFrom = "*** 개인정보보호를 위한 이메일주소 노출방지 ***";
// 보내는사람 메일주소
$name = $_POST['name'] ;
$mailSubject = "블리아트-문의";
$mailContent = '보낸사람 :'.$_POST['name'].'<br>'
.'회사명:'.$_POST['company'].'<br>'
.'전화번호:'.$_POST['phone'].'<br>'
.'Email : '.$_POST['email'].'<br>'
. '홈페이지설명 :'.$_POST['content'];
$mailHeader = "From: $mailFrom\r\n";
$mailHeader .= "MIME-Version: 1.0\r\n";
$mailHeader .= "Content-type: text/html; charset=euc-kr\r\n";
$mailHeader.= 'Cc: *** 개인정보보호를 위한 이메일주소 노출방지 ***' . "\r\n"; //참고수신인
$mailHeader.= 'Bcc: *** 개인정보보호를 위한 이메일주소 노출방지 ***' . "\r\n"; //참고수신인2
$mailResult = mail ($mailTo, $mailSubject,
$mailContent, $mailHeader,'-f'.$mailFrom);
echo 'Dear '.''.$name.'<br>';
echo 'Thanks for submitting the form.<br />';
echo 'Your name is ' . $name.'<br>';
echo 'Your phone number is ' . $phone . '<br />';
echo 'Your email is: ' . $email . '<br />';
echo 'Your company?: ' . $company . '<br />';
echo 'Your content is: ' . $content . '<br />';
if (true == $mailResult) {
echo "Success 메일이 발송되었읍니다.";
}
else {
echo "Failuare 메일이 발송되지 않았읍니다.";
}
?>
</body>
</html>
전송 한 후
Dear ㄴㅇㄹㄴㅇㄹ
Thanks for submitting the form.
Your name is ㄴㅇㄹㄴㅇㄹ
Your phone number is
Your email is:
Your company?:
Your content is:
Success 메일이 발송되었읍니다.
이름 제외한 나머지는 안나오고 ㅠㅠ
메일도 안오네용 .. 뭐가문제일까요
!-->!-->
답변을 작성하시기 전에 로그인 해주세요.