测试了几个 SMTP 插件都提示 Network is unreachable ,网站能正常访问,也能 ping 。
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 42:01:0a:8c:00:02
inet addr:10.140.0.2 Bcast:10.140.0.2 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1460 Metric:1
RX packets:4282 errors:0 dropped:0 overruns:0 frame:0
TX packets:3423 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1110693 (1.0 MiB) TX bytes:2990663 (2.8 MiB)
Connection: opening to
smtp.gmail.com:587, timeout=300, options=array ()
Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to
smtp.gmail.com:587 (Network is unreachable)
SMTP ERROR: Failed to connect to server: Network is unreachable (101)
SMTP connect() failed.
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/347789
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.