无法使用 gmail SMTP 从 PHP 发送电子邮件

发布于 2024-12-07 23:20:10 字数 314 浏览 3 评论 0原文

我尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如若梦似彩虹 2024-12-14 23:20:10

听起来 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.

向日葵 2024-12-14 23:20:10

您是否删除了 php.ini 中 extension=php_openssl.dll 行前面的 ;

Did you remove the ; in front of the line extension=php_openssl.dll in your php.ini?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文