Answer the question
In order to leave comments, you need to log in
Sending emails with PHP?
Not receiving emails. I currently use free hosting qlihost.ru. A success message appears, but there is no email.
There is a form:
<form id="form" class="form-signin p-4 mt-4" action="" method="post">
<div class="row">
<div class="col-sm">
<input type="text" name="your_name" id="inputName" class="form-control" placeholder="Ваше имя*" required="">
<br>
<input type="email" name="your_mail" id="inputEmail" class="form-control" placeholder="Ваш E-mail">
<br>
<input type="tel" name="your_phone" id="inputPassword" class="form-control mb-4" placeholder="Номер телефона*" required="">
</div>
<div class="col-sm">
<textarea name="your_message" class="form-control" placeholder="Ваше сообщение" style="height: 92px;"></textarea>
<br>
<input type="submit" name="send" value="Получить консультацию" class="btn btn-block bg-autumn text-white in_banner">
</div>
</div>
<span class="text-muted">Вы соглашаетесь с условиями обработки персональных данных. <a href="#" class="texe-inform">Ознакомиться</a>.</span>
</form>
<? $name=$_POST['your_name'];
$mail=$_POST['your_mail'];
$phone=$_POST['your_phone'];
$message=$_POST['your_message'];
$send=$_POST['send'];
$my_mail='[email protected]';
if(isset($send)){
if($send=='Получить консультацию'){
if(!empty($name) && !empty($phone)){
mail($my_mail, $phone, $message.' ('.$mail.')');
echo "Спасибо за Ваше сообщение, оно успешно отправлено.";
}
}
} ?>
Answer the question
In order to leave comments, you need to log in
Success message appearsIt is tied to the presence of fields, and not to sending a letter.
I especially want to know what exactly you need to look at in the logs, if they matter here. Thank you in advance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question