我有一个使用php
功能的mail()
项目。但是不发送电子邮件以便我安装sendmail
。
当我通过命令行sendmail
echo "My test email being sent from sendmail" | /usr/sbin/sendmail -v mail@someemail.com
时
然后我收到此消息
WARNING: local host name (server) is not qualified;
...
server: Name server timeout
...
<mail@someemail.com>... Deferred: Name server: someemail.com.: host name lookup failure
所以关注一些地方后,我更改了/etc/hosts
添加此行
127.0.0.1 localhost localhost.localdomain myhostname.org
甚至/etc/hostnames
添加myhostname.org
但我仍然收到失败消息,告诉发件人mymail@server.com
应该是mail@myhostname.org