M
M
Michael_Mel2019-04-08 12:05:13
SMTP
Michael_Mel, 2019-04-08 12:05:13

How to fix the problem with sending mail through PHPMailer?

Hello! implemented script for sending messages

$message = "Спасибо за регистрацию!";
$mail = new PHPMailer;
$mail->CharSet = 'UTF-8';
$mail->isSMTP();
$mail->SMTPAuth = true;
$mail->SMTPDebug = 0;
$mail->Host = 'ssl://mail.nic.ru';
$mail->Port = 465;
$mail->Username = 'хххх';
$mail->Password = 'хххх';
$mail->setFrom('ххххх', 'ххххх');        
$mail->addAddress($mail_user, $name_user." ".$fam_user);
$subject = 'Регистрация на портале';
$mail->Subject = $subject;
$body = $message;
$mail->msgHTML($body);
$mail->send();

everything reaches mail, yandex and many other mail servers perfectly and immediately,
but it doesn’t come to a couple (gmail) or not at all or goes to spam.
this answer comes
Reporting-MTA: dns; mxgw02.ххх.ru
Received-From-MTA: DNS; relay13.nicmail.ru
Arrival-Date: Sun, 7 Apr 2019 22:40:14 +0300

Final-Recipient: RFC822; ххх@ххх.ru
Action: failed
Status: 5.7.1
Remote-MTA: DNS; ххх.ru
Diagnostic-Code: SMTP; 550 5.7.1 This message is blocked due to security reason
Last-Attempt-Date: Sun, 7 Apr 2019 22:40:19 +0300

read about 550 5.7.1 - like spam.
Indeed, this domain was previously infected.
And now how to whitewash your name? or is it necessary with each mailer so that they are included in the list of trusted ones?
Or maybe you can additionally prescribe something in the phpMailera settings when generating information to send?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-04-08
@MechanID

Both the domain and the IP address of the sender have a reputation, and there are a lot of organizations that track it.
check your domain and ip on mxtoolbox.com and multirbl.valli.org almost all major blacklists are there.
If everything is OK there, then the next question is more likely in the usual spam checks, starting from spf dkim dmarc and ending with the content of the letter itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question