我尝试使用 gmail SMTP 从 wordpress 发送消息。
服务器设置为 smtp.gmail.com,端口设置为 465。
我收到这条消息:
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)
我在 centOS 上
我是否应该重新编译 PHP 并在某处启用某些东西?
最佳答案
听起来像openssl尚未安装/启用。检查 phpinfo()
是否提及 openssl,如果不存在,您可能需要使用 openssl 支持重新编译或在 php.ini 中启用扩展。
关于php - 无法使用 gmail SMTP 从 PHP 发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7636921/