skip to Main Content

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


  1. smtp.info@myDomain.com is not valid host.

    Change MAIL_HOST to smtp.myDomain.com

    Login or Signup to reply.
  2. Once you try change
    MAIL_PORT=587
    MAIL_ENCRYPTION=tls

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search