尝试使用带有 Office365 的 Symfony Mailer 发送邮件,但继续获取 SSL 操作失败,代码为 1
Trying to send mail using Symfony Mailer with Office365 but keep getting SSL operation failed with code 1
我正在尝试让 Symfony 5.0.0 的邮件程序组件与 Office 365 一起工作。
我可以使用
在 SwiftMailer 中让它工作
MAILER_URL=smtp://smtp.office365.com:587?encryption=tls&auth_mode=login&username=#####&password=####
但是当我尝试将邮件程序与
一起使用时
MAILER_DSN=smtps://#####:######@smtp.office365.com:587
我收到以下错误
Connection could not be established with host "ssl://smtp.office365.com:587": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number.
如果我只尝试使用 SMTP,我会得到
Connection to "smtp.office365.com:587" timed out.
您是否厌倦了 Office 365 电子邮件连接器?
我目前找到的解决方案是这样的。
Issue Github
我正在尝试让 Symfony 5.0.0 的邮件程序组件与 Office 365 一起工作。
我可以使用
在 SwiftMailer 中让它工作MAILER_URL=smtp://smtp.office365.com:587?encryption=tls&auth_mode=login&username=#####&password=####
但是当我尝试将邮件程序与
一起使用时MAILER_DSN=smtps://#####:######@smtp.office365.com:587
我收到以下错误
Connection could not be established with host "ssl://smtp.office365.com:587": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number.
如果我只尝试使用 SMTP,我会得到
Connection to "smtp.office365.com:587" timed out.
您是否厌倦了 Office 365 电子邮件连接器?
我目前找到的解决方案是这样的。 Issue Github