M
M
Mikhail Smirnov2020-10-06 13:27:32
1C-Bitrix
Mikhail Smirnov, 2020-10-06 13:27:32

Why doesn't Bitrix send an email to mail.ru via cron?

An interesting problem has come up.

There is a code for crons that sends mailings to users, to Yandex, Google mail, letters go without problems, to spam, etc. do not reach

But all mail.ru addresses do not receive letters at all, in spam, etc. no

I use this code to send

$arEventFields = array(
            "EMAIL" => $email,
        );

        $event = new CEvent;
        $res = $event->SendImmediate("SUBSCRIBE_TEMPLATE", 's1', $arEventFields);


If you copy it from the cron script and, for example, run it through the command line in the Bitrix admin panel, then the letter comes to mail.ru

, what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2020-10-06
@fortoster82

what could be the problem?

There are services for checking the correctness of sending letters, setting up servers, alas, I can’t find a link to one excellent site, but it still became paid. Try this one: https://www.mail-tester.com/
This problem is old, letters are not always delivered out of the box, and most often it was mailru.
For emails from the site, you need to make additional settings here /bitrix/admin/settings.php?lang=ru&mid=main&mid_menu=1 Mail tab.
Look for Anton Dolganin's blog on Bitrix Blogs/Forums. I remember he had such an article.
As for the above-mentioned settings service, it will give you what you need to do and what records to make in the domain DNS.
If you get tired of fighting, use Yandex smtp or mail ru by connecting mail to their servers, or send letters via sendpulse, for example, by connecting its api.
Everything is fine with your code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question