【发布时间】:2018-05-26 04:43:49
【问题描述】:
谁能帮我解决 mail() 函数问题,它不是发送电子邮件。我不确定,但这是由于虚拟主机设置。我的'/etc/hosts' 文件的内容是 -
127.0.1.1 App App
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
我搜索了很多,发现我需要更新“/etc/hosts”文件: 纳米 /etc/hosts
看起来像这样:127.0.0.1 localhost.localdomain localhost 你的主机名
但是当我在终端输入 hostname 时,它显示 App ,我认为是因为虚拟主机。
我运行以下命令来检查连接 -
telnet smtp.gmail.com 465
输出是 -
Trying 209.85.201.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
Connection closed by foreign host.
请帮忙!!!
【问题讨论】: