Form on page looks exactly as:
<div class="form-widget">
<div class="form-result"></div>
<form class="row" id="zithr" action="include/form.php" method="post">
<div class="form-process"></div>
<div class="col-md-6 form-group">
<label for="zithr-name">ФИО <small>*</small></label>
<input type="text" id="zithr-name" name="zithr-name" value=""
class="form-control required"/>
</div>
<div class="col-md-6 form-group">
<label for="zithr-email">Электронная почта <small>*</small></label>
<input type="email" id="zithr-email" name="zithr-email" value=""
class="required email form-control"/>
</div>
<div class="w-100"></div>
<div class="col-12 form-group">
<label for="zithr-message">Сообщение <small>*</small></label>
<textarea class="required form-control" id="zithr-message"
name="zithr-message" rows="6" cols="30"></textarea>
</div>
<div class="col-12 hidden">
<input type="text" id="zithr-botcheck" name="zithr-botcheck" value=""
class="form-control"/>
</div>
<div class="col-12">
<button class="button button-rounded button-large ls0 t400 m-0 nott" type="submit" id="zithr-submit"
name="zithr-submit" value="submit">Переслать
</button>
</div>
<!-- Form Settings -->
<!-- Поля прямого письма - с сайта в адрес Анны Зайцевой -->
<input type="hidden" name="prefix" value="zithr-">
<input type="hidden" name="subject" value="Сообщение с сайта курса для HR по IT-рекрутингу">
<input type="hidden" name="replyto" value="zithr-email">
<input type="hidden" name="html_title" value="Получено сообщение с сайта...">
<!-- Поля автоответа сервера на адрес посетителя сайта, указанный в форме обратной связи -->
<input type="hidden" name="autoresponder" value="false">
</form>
</div>include/form.php important parts of code are:
/-------------------------------------------------
Sender's Email
---------------------------------------------------/
$fromemail = array(
'email' => 'info@bulash.ru', // Company's Email Address (preferably currently used Domain Name)
// 'email' => 'anna.recruting@gmail.com', // Company's Email Address (preferably currently used Domain Name)
'name' => 'Сайт курса для HR по IT-рекрутингу' // Company Name
);
/-------------------------------------------------
PHPMailer Initialization
---------------------------------------------------/
$mail = new PHPMailer();
/* Add your SMTP Codes after this Line */
$Google = false;
$Yandex = true;
// If both are false - error message shown
// If one of them assigned to true - not shown success / error
if ($Google) {
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->CharSet = 'UTF-8';
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = "anna.recruting@gmail.com";
$mail->Password = "***";
}
if ($Yandex) {
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->CharSet = 'UTF-8';
$mail->Host = 'smtp.yandex.com';
$mail->Port = 587;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = "info@bulash.ru";
$mail->Password = "***";
}
// End of SMTP
What's happened:
Both $Google and $Yandex set to false - shown red alert - can't instantiate PHPMailer. Sure.
$Google == true. Mail message sent finished with error (I see it by debug) but no error message shown. Spinner rotating indefinitely, form blocked. Why?
$Yandex == true. Mail message sent finished with no error (message received) but no success message shown. Spinner rotating indefinitely, form blocked. Why?
