【发布时间】:2012-04-25 01:00:32
【问题描述】:
我正在尝试使用 PHPMailer 通过 SMTP 和 gmail 发送电子邮件。正在使用的确切脚本可在其他服务器上运行,但不适用于该特定托管公司的服务器。
我检查了phpinfo(),它告诉我allow_url_fopen 是on,并且没有列出disabled_functions 像fopen。
脚本失败,它告诉我:
SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
否则
SMTP Error: Could not authenticate.
我假设这是因为它无法连接,因为这又在其他服务器上工作并且身份验证凭据是正确的。
所以我更一般地问,有没有一种方法可以使用 PHP 或 jailshell ssh 来检查端口是否真的打开了?
【问题讨论】: