I am facing a problem with sending mails using outlook account in php laravel the exception messages says :
Swift_TransportException
Connection could not be established with host smtp-mail.outlook.com :stream_socket_client(): Unable to connect to tcp://smtp-mail.outlook.com:587 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond)
my .env file :
MAIL_DRIVER=smtp MAIL_HOST=smtp-mail.outlook.com
MAIL_PORT=587
MAIL_USERNAME=mail
MAIL_PASSWORD=password
[email protected]
MAIL_FROM_NAME=${APP_NAME} MAIL_ENCRYPTION=tls
Thank’s in advance!