我正在用 PHP 构建一个需要邮件功能的内部 Web 应用程序。我使用了此处列出的代码:
从 PHP 页面使用 GMail SMTP 服务器发送电子邮件
当我从家里运行它时,它就像一种魅力。
但是,当我从办公室运行代码时,我得到以下信息:
Failed to connect to ssl://smtp.gmail.com:465 [SMTP: Failed to connect socket: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (code: -1, response: )]
知道如何解决这个问题吗?
谢谢,
-JWW