A
A
Anya Ivanova2020-04-27 10:11:52
reCAPTCHA
Anya Ivanova, 2020-04-27 10:11:52

Why does an application come from the site from the bot every hour?

I use Php Mailer to send emails from the application on the site. I noticed that empty applications constantly come day and night, almost every hour. What could it be? How to fix?

require 'PHPMailer/phpmailer/PHPMailer.php';
require 'PHPMailer/phpmailer/Exception.php';
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->setFrom('******');
$mail->addAddress('*******');  
$mail->Subject = 'На сайте******* заполнили форму';                      
$mail->msgHTML($text);
$mail->addAttachment('abc.zip');
$mail->send();

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Sundukov, 2020-04-27
@alekciy

Put reCapcha on the application form.

I
Ilya, 2020-04-27
@rpsv

It's not about PHP processing, it's about spamming. Add a captcha to the form itself, or a captcha-free check before sending an email

A
Anton, 2020-04-27
@anton99zel

First, make required fields - required fields)
Secondly, Recaptcha, you can connect it here https://www.google.com/recaptcha/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question