不能用mail()函数发送邮件
Oct 19 22:56:39 localhost sendmail[31320]: My unqualified host name (localhost) unknown; sleeping for retry
Oct 19 22:57:39 localhost sendmail[31320]: unable to qualify my own domain name (localhost) — using short name
Oct 19 22:57:39 localhost sendmail[31320]: m9JEvdL4031320: from=nginx, size=687, class=0, nrcpts=0, msgid=<200810191457.m9JEvdL4031320@localhost>, relay=nginx@localhost
Oct 19 22:58:04 localhost sendmail[31729]: My unqualified host name (localhost) unknown; sleeping for retry
Oct 19 22:59:04 localhost sendmail[31729]: unable to qualify my own domain name (localhost) — using short name
Oct 19 22:59:04 localhost sendmail[31729]: m9JEx4XA031729: from=nginx, size=816, class=0, nrcpts=0, msgid=<200810191459.m9JEx4XA031729@localhost>, bodytype=8BITMIME, relay=nginx@localhost
解决办法
>>hostname wduw
>>vi /etc/hosts/
192.168.0.84 wduw wduw
>>rc-update add sendmail default
>>reboot
>>/etc/init.d/sendmail status
* status: started
192.168.0.84 wduw wduw
>>rc-update add sendmail default
>>reboot
>>/etc/init.d/sendmail status
* status: started
Harrie
我是王岩,2010年为了扩展自己的事业,我成立了一家互联网公司:上海岩创网络科技有限公司,2011年加入宏路数据任技术总监,2017年成立动乂岩数据技术有限公司同时兼任动点科技CTO。现在我正在搭建团队,在微信生态和企业服务领域进行探索。我的联系方式是:手机:13918304704 微信: harriewang QQ:13689186 欢迎大家跟我交流和讨论。