php mail功能无法在Digital Ocean上运行

时间:2016-03-02 13:19:03

标签: php ubuntu-14.04 sendmail digital-ocean

我在数字海洋上运行了NginX的Ubuntu 14.0服务器。

我尝试添加以下PHP代码

@mail($email_to, $email_subject, $email_message, $headers); 

但它不起作用

所以我用Google搜索并按照教程

进行操作
https://holarails.wordpress.com/2013/11/17/configure-sendmail-in-ubuntu-12-04-and-make-it-fast/

所以现在我的hots文件看起来像这样

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data
127.0.1.1 iclock iclock
#127.0.0.1 localhost

127.0.0.1 localhost localhost.localdomain iclock

# 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

然后我运行以下命令

sendmailconfig

但是,当我尝试发送电子邮件时,它仍无效。

任何帮助都会得到赞赏。

由于

0 个答案:

没有答案