I'm trying to send mails when a user signs up. and getting connection error.
I use event listener for that and to try my mailing I use mailtrap, but I get an error that I don't know what excacly cousing it. here is what it looks like:
Connection could not be established with host smtp.mailtrap.io [php_network_getaddresses: getaddrinfo failed: A non-recoverable error occurred during a database lookup. #0]
Btw I defined all the infromation required in .env file
What happens if you ping smtp.mailtrap.io from the cli on that box? Does it resolve to an IP? That error (php_network_getaddresses: getaddrinfo failed) is usually caused by DNS issues on the server and not necessarily your code.
You'll have to fix the DNS on your server then. Not sure how to help with that beyond googling php_network_getaddresses: getaddrinfo failed and your servers os.