无法配置sendmail发送电子邮件

时间:2016-10-28 15:12:45

标签: php email sendmail

我有一个使用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

0 个答案:

没有答案