A
A
Andrey Pushkin2018-05-14 12:50:52
linux
Andrey Pushkin, 2018-05-14 12:50:52

How to deal with a Bitrix mail error?

A test letter is sent to the mail address [email protected] through the standard php mail function. To bring the test as close as possible to the real work of mail, a service box has been opened.
The source code of the site check script is sent as the test text of the letter.
No user data is transferred!
Please note that the test does not check the delivery of the letter to the mailbox. Moreover, mail delivery to other mail servers cannot be tested.
If the email sending time is longer than a second, it can significantly slow down the site. Contact your hosting provider with a request to set up delayed mail sending (via a spooler) or enable mail transfer (and agents) via cron. To do this, you need to add a constant to dbconn.php:
define('BX_CRONTAB_SUPPORT', true);
Then add the php script /var/www/bitrix/modules/main/tools/cron_events.php to run every minute on cron.
(replace /var/www with your path to the root of the site).
But if the mail () function did not work in this case, it can be argued with great certainty that sending mail in the standard php way on the server is impossible.
If the hoster provides alternative ways to send mail from the site, they can be used through the custom_mail function. Define this function in the /bitrix/php_interface/dbconn.php file, it will be used instead of the built-in mail function with the same set of parameters.
See system check log for details.

5af95b73eb0d7788907677.jpeg
Here is what Bitrix himself wrote to me.
What manipulations I did:
1. added via manage sites the email address of mail.ru
2. configured the cron
that there is
BitrixVM 7.2.2
, respectively, the installed distribution kit
used the information From Here From Here and From Here The video about mail starts from 22-23 minutes
Maybe I'm not doing it right? or I need to raise the mail server xs

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Official account of the Timeweb team, 2020-06-30
@timeweb_team

This message indicates that it is impossible to send mail from the server where the site is located using the standard php mail() function.
To test the function, you can connect to your server via ssh and enter the command:
php -r 'mail("[email protected]", "My Subject", "test");'
After this command, a message will appear with the reasons why the send does not work. For example, if there is a message about the unavailability of port 25, then your mail server is not configured in principle and you need to install the MTA necessary to send mail (for example, postfix).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question