I have a domain, and I created an email with the Cpanel on that server. Now when I try to use it, I get the following error.
Connection could not be established with host smtp.info@myDomain.com
:stream_socket_client(): php_network_getaddresses: getaddrinfo failed:
Name or service not known
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.info@myDomain.com
MAIL_PORT=465
MAIL_USERNAME=info@myDomain.com
MAIL_PASSWORD={mypassword}
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=info@myDomain.com
MAIL_FROM_NAME="${APP_NAME}"
2
Answers
smtp.info@myDomain.com is not valid host.
Change MAIL_HOST to smtp.myDomain.com
Once you try change
MAIL_PORT=587
MAIL_ENCRYPTION=tls