I can not save email settings.
I am developing the system while, after that we will complete its purchase
Hello, @viktarradzin
Could you try to configure some E-mail client (e.g. Outlook) on a WFE-server with the same preferences? Does it work? Also, you could ping the IMAP and SMTP servers via PowerShell with these commands:
ping imap.yandex.ru
ping smtp.yandex.ru
If you can't configure the client, then the issue is most likely that your environment restricts access to E-mail servers (e.g. via firewall). Otherwise, please reproduce the issue and provide us with SharePoint logs in the ticket you have already opened.