不知道为什么smtp.office365.com突然停止了生产工作,但却在开发中工作。让我们看看一些代码:
.env配置
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=25
MAIL_USERNAME=nao_responda@primorossi.com
MAIL_PASSWORD=********
MAIL_ENCRYPTION=tls
MAIL_SMTPAuth=true
MAIL_FROM_NAME="Grupo Primo Rossi"
MAIL_FROM_ADDRESS=nao_responda@primorossi.com
Laravel错误页面:
Swift_TransportException
Connection could not be established with host smtp.office365.com [Connection timed out #110]
最奇怪的是,当我发布并无故停止工作时,这个配置运行良好。
有人吗?提前感谢!
已解决!从25到587
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=nao_responda@primorossi.com
MAIL_PASSWORD=********
MAIL_ENCRYPTION=tls
MAIL_SMTPAuth=true
MAIL_FROM_NAME="Grupo Primo Rossi"
MAIL_FROM_ADDRESS=nao_responda@primorossi.com
现在它运行良好!