我试图让PHPMailer工作但不断出现SMTP connect() failed
错误。
我最终只使用了github repository中提供的gmail示例,但仍然无法正常工作。
我已将SMTPDebug
设置为4
以及此处的错误消息:
Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
SMTP ERROR: Failed to connect to server: 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. (10060)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
我尝试但没有工作的事情:
我本地的IIS和WAMP
设置open_ssl以启用