Всем привет, не могу разобраться почему на почту с лендинга не приходят заявки.
Есть файл script.js в нём есть такая часть содержимого.
function clearForm (){
$(this).removeClass('valid-for-file-upload');
$('input:not(":checkbox"), textarea, select').val('');
$('.form-group').removeClass('has-success').removeClass('has-error');
formtype ='';};
$thisText = $(this).text();
$thisBtn.addClass('disabled').text('Отправка...')
$.ajax({//отправляем аяксом
url:'php/mail.php',
type:'POST',
data:'jsonData='+ $.toJSON(formData),
success:function(){
$('.submit-form-loading').fadeOut();
$('.submit-form-error').fadeOut();
magnificPopup.close();
setTimeout(function(){
$('.thank-you-btn').magnificPopup({
type:'ajax',
removalDelay:500,
ajax:{
settings:null,
cursor:'mfp-ajax-cur',
tError:'<a href="%url%">Контент</a> не может быть загружен.',},
callbacks:{
beforeOpen:function(){this.st.mainClass ='mfp-zoom-in';},},
midClick:true}).magnificPopup('open');},501);
$thisBtn.removeClass('disabled').text($thisText);
clearForm ();
reachGoalFunc(yaTarget);
reachGoalFunc(obwee_koli4estvo);},
error:function(){
alert('При отправке данных произошла ошибка, попробуйте снова.');
$thisBtn.removeClass('disabled').text($thisText);
clearForm ();}});}});});
В файле index.php следующая часть кода:
<divclass="buy-one-click"><divclass="container"><divclass="section-title"><h3>Продайте всего за 1 клик!</h3></div><ahref="modal-service1.html"class="ajax-popup-link btn btn-success"style="text-transform: none; padding:20px20px20px40px; width:300px; margin:10pxauto0; display:block; line-height:0.8;position:relative; font-size:22px;"><imgsrc="img/arrow-right.png"style="position:absolute; top:21px;left:53px;">Оставить
заявку</a></div>
И третий файл mail.php
<?php
if(isset($_POST['notEmpty'])){$name = $_POST['notEmpty'];}if(isset($_POST['phone'])){$phone = $_POST['phone'];}if(isset($_POST['formData'])){$formData = $_POST['formData'];}
$to ="online@yandex.ru";/*Укажите адрес, га который должно приходить письмо*/
$sendfrom ="online@yandex.ru";/*Укажите адрес, с которого будет приходить письмо, можно не настоящий, нужно для формирования заголовка письма*/
$headers ="From: ". strip_tags($sendfrom)."\r\n";
$headers .="Reply-To: ". strip_tags($sendfrom)."\r\n";
$headers .="MIME-Version: 1.0\r\n";
$headers .="Content-Type: text/html;charset=utf-8 \r\n";
$subject ="Новая заявка";
$message ="$formData<br> <b>Имя пославшего:</b> $name <br><b>Телефон:</b> $phone<br>";
$send = mail ($to, $subject, $message, $headers);?>
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
it-seo77
Всем привет, не могу разобраться почему на почту с лендинга не приходят заявки.
Есть файл script.js в нём есть такая часть содержимого.
В файле index.php следующая часть кода:
И третий файл mail.php
Где тут могут быть ошибки?
Link to comment
Share on other sites
27 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.