noushad mohammed
noushad mohammed

Reputation: 375

fwrite(): SSL: An existing connection was forcibly closed by the remote host

I am trying to send email in windows server using laravel. Below is my email configuration. The front end and backend application loaded in http and the firewall is enabled and disabled. But when i try to send email the message is saying as

"fwrite(): SSL: An existing connection was forcibly closed by the remote host".

MAIL_DRIVER=smtp
MAIL_HOST=outlook.office365.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=xxxx
MAIL_ENCRYPTION=TLS
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME=${APP_NAME}

Upvotes: 0

Views: 143

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49453

The basic SMTP authentication is disabled by default on all tenants, see Deprecation of Basic authentication in Exchange Online for more information.

You need to use the modern auth instead, see Authenticate an IMAP, POP or SMTP connection using OAuth.

Upvotes: 0

Related Questions