Problem with mail

Topic: Problem with mail

I use wialon local 2104 and I have a problem with setting e-mail. I tried setting it up on several servers to send mail - it didn’t work, I configured postfix on localhost - it didn’t work either, although I successfully sent mail from console with sendmail. The logs show approximately the same error:

11/9/2023, 3:15:33 PM: trace: Cannot send email. Check SMTP settings.
[Arguments] {
   { Error: queryA EREFUSED localhost
       at QueryReqWrap.onresolve [as oncomplete] (dns.js:196:19)
     errno: 'EREFUSED',
     code: 'EDNS',
     syscall: 'queryA',
     hostname: 'localhost',
     command: 'CONN' } }

How to solve this problem?