Answer the question
In order to leave comments, you need to log in
When sending data from the form to the mail, the mailbox is blocked for spam, how to fix it?
I created a form on the site, the data from it should come to mail A and be sent from mail B. Mail B is blocked after the first letter from the site for spam ( Error: authentication failed: Your message looks like spam.). Is there any way to bypass this blocking?
<?php
require_once('phpmailer/PHPMailerAutoload.php');
$mail = new PHPMailer;
$mail->CharSet = 'utf-8';
$name = $_POST['user_name'];
$phone = $_POST['user_phone'];
$message = $_POST['user_message'];
$mail->SMTPDebug = 2; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.yandex.ru'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '[email protected]'; // Ваш логин от почты с которой будут отправляться письма
$mail->Password = 'password'; // Ваш пароль от почты с которой будут отправляться письма
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to / этот порт может отличаться у других провайдеров
$mail->setFrom('[email protected]'); // от кого будет уходить письмо
$mail->addAddress('[email protected]'); // Кому будет уходить письмо
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Заявка '.$name;
$mail->Body = '' .$name . ' оставил заявку, его телефон ' .$phone. '<br>Заявка пользователя: ' .$message;
$mail->AltBody = '';
if(!$mail->send()) {
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
header('location: allisworking.html');
}
?>
Answer the question
In order to leave comments, you need to log in
Set up mail server and DNS.
If Yandex, then he does not like repetitive letters. By content and sender.
https://www.mail-tester.com/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question