无法使用 gmail SMTP 从 PHP 发送电子邮件
我尝试使用 gmail SMTP 从 WordPress 发送消息。
服务器设置为 smtp.gmail.com,端口设置为 465。
我收到这条消息:
<前><代码>SMTP ->错误:无法连接到服务器:无法找到套接字传输“ssl”-您是否忘记启用它 配置PHP? (34225384)
我使用的是 centOS
我应该重新编译 PHP 并在某处启用某些功能吗?
I tried to send messages from wordpress using gmail SMTP.
Server is set to smtp.gmail.com and port to 465.
I'm getting this message:
SMTP -> ERROR: Failed to connect to server: Unable to find the
socket transport "ssl" - did you forget to enable it when you
configured PHP? (34225384)
I'm on centOS
Should I recompile PHP and just enable something somewhere ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来 openssl 尚未安装/启用。检查
phpinfo()
是否提及 openssl,如果不存在,您可能需要使用 openssl 支持重新编译或在 php.ini 中启用扩展。It sounds like openssl hasn't been installed/enabled. Check
phpinfo()
for mentions of openssl, if it's not there you might need to re-compile with openssl support or enable the extension in php.ini.您是否删除了 php.ini 中
extension=php_openssl.dll
行前面的;
?Did you remove the
;
in front of the lineextension=php_openssl.dll
in your php.ini?