Всем привет, в общем есть форма, нужно отправлять на почту данные, реализован файл php, указал свой ящик и т.д., но никакого отклика нету, Если кто знает, напишите, буду благодарен
html
<div class="modal light-box fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="false">
<!-- Modal -->
<div class="container">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close icon_close" data-dismiss="modal" aria-label="Close"></button>
<div class="popup-heading">
<p>Let’s take the next step togeder</p>
<h1>start your project</h1>
</div>
</div>
<div id="contact" class="modal-body">
<div class="popup-form">
<form action="./contact.php" target="hidden" method="post">
<div id="alert-msg" class="alert-msg"></div>
<div class="form-group col-md-6 col-sm-6">
<input type="text" class="form-control" id="input_name" name="contact-name" placeholder="Name*" required="required"/>
</div>
<div class="form-group col-md-6 col-sm-6">
<input type="text" class="form-control" id="input_compnay_name" name="contact-company-name" placeholder="Company"/>
</div>
<div class="form-group col-md-6 col-sm-6">
<input type="email" class="form-control" id="input_email" name="contact-email" placeholder="Email*" required="required"/>
</div>
<div class="form-group col-md-6 col-sm-6">
<input type="text" class="form-control" id="input_phone" name="contact-phone" placeholder="Telephone"/>
</div>
<div class="form-group col-md-6 col-sm-6">
<input type="text" class="form-control" id="input_budget" name="contact-budget" placeholder="Budget*" required="required"/>
</div>
<div class="form-group col-md-6 col-sm-6">
<input type="text" class="form-control" id="input_type" name="contact-type" placeholder="Type*" required="required"/>
</div>
<div class="form-group col-md-12 col-sm-12">
<input type="text" class="form-control" id="textarea_message" name="contact-message" placeholder="Objectives"/>
</div>
<input type="submit" value="SEND" class="send" />
</form>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-1"></div>
</div>
</div>
php
<?php
$mailTo = 'мой email@gmail.com';
$successMsg = 'Thank you, mail sent successfuly!';
$fillMsg = 'Please fill all fields!';
$errorMsg = 'Hm.. seems there is a problem, sorry!';
?>
<?php
if(
!isset($_POST['contact-name']) ||
!isset($_POST['contact-company-name']) ||
!isset($_POST['contact-email']) ||
!isset($_POST['contact-phone']) ||
!isset($_POST['contact-budget']) ||
!isset($_POST['contact-type']) ||
!isset($_POST['contact-message']) ||
empty($_POST['contact-name']) ||
empty($_POST['contact-company-name']) ||
empty($_POST['contact-email']) ||
empty($_POST['contact-phone']) ||
empty($_POST['contact-budget']) ||
empty($_POST['contact-type']) ||
empty($_POST['contact-message'])
) {
echo '<script type="text/javascript">window.parent.$("#contact #alert-msg").html("' . $fillMsg . '");window.parent.$("#contact #alert-msg").show();</script>';
} else {
?>
<?php
$msg = "Name: ".$_POST['contact-name']."\r\n";
$msg .= "Company: ".$_POST['contact-company-name']."\r\n";
$msg .= "Email: ".$_POST['contact-email']."\r\n";
$msg .= "Telephone: ".$_POST['contact-phone']."\r\n";
$msg .= "Budget: ".$_POST['contact-budget']."\r\n";
$msg .= "Type: ".$_POST['contact-type']."\r\n";
$msg .= "Objectives: ".$_POST['contact-message']."\r\n";
$success = @mail($mailTo, $_POST['contact-email'], $msg, 'From: ' . $_POST['contact-name'] . '<' . $_POST['contact-email'] . '>');
if ($success) {
echo '<script type="text/javascript">window.parent.$("#contact #alert-msg").html("' . $successMsg . '");
window.parent.$("#input_name").val("");
window.parent.$("#input_compnay_name").val("");
window.parent.$("#input_email").val("");
window.parent.$("#input_phone").val("");
window.parent.$("#input_budget").val("");
window.parent.$("#input_type").val("");
window.parent.$("#textarea_message").val("");
window.parent.$("#contact #alert-msg").show();</script>';
}
else {
echo '<script type="text/javascript">window.parent.$("#contact #alert-msg").html("' . $errorMsg . '");window.parent.$("#contact #alert-msg").show();</script>';
}
}