邮件在 Debian 中不起作用

邮件在 Debian 中不起作用

因此,我尝试在 PHP 中启动 mail() 函数,因此我将邮件(以及 mailutilities)包安装到我的 debian 服务器中。当我尝试发送电子邮件时,我没有收到它。

日志内容如下:

May 23 22:22:50 raspberrypi sm-msp-queue[1299]: My unqualified host name (raspberrypi) unknown; sleeping for retry
May 23 22:23:16 raspberrypi sendmail[1530]: My unqualified host name (raspberrypi) unknown; sleeping for retry
May 23 22:23:59 raspberrypi sm-mta[819]: unable to qualify my own domain name (raspberrypi) -- using short name
May 23 22:23:59 raspberrypi sm-mta[1534]: starting daemon (8.14.4): SMTP+queueing@00:10:00
May 23 22:24:00 raspberrypi sm-msp-queue[1299]: unable to qualify my own domain name (raspberrypi) -- using short name
May 23 22:24:16 raspberrypi sendmail[1530]: unable to qualify my own domain name (raspberrypi) -- using short name
May 23 22:24:16 raspberrypi sendmail[1530]: v4NJOGSk001530: from=www-data, size=239, class=0, nrcpts=1, msgid=<2017052319                                               24.v4NJOGSk001530@raspberrypi>, relay=www-data@localhost
May 23 22:24:16 raspberrypi sm-mta[1553]: v4NJOGcp001553: from=<www-data@raspberrypi>, size=458, class=0, nrcpts=1, msgid                                               =<201705231924.v4NJOGSk001530@raspberrypi>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]to
May 23 22:24:17 raspberrypi sendmail[1530]: v4NJOGSk001530: to=hiding_my_real_emailgmail.com, ctladdr=www-data (33/33), dela                                               y=00:00:01, xdelay=00:00:01, mailer=relay, pri=30239, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (v4NJOGcp001553                                                Message accepted for delivery)

我的邮箱一直是空的。我需要在服务器上配置 SMTP 服务器吗?

答案1

我是否需要在我的服务器或其他服务器上配置 SMTP 服务器?

是的。要么这样做,要么配置 PHP 使用第三方提供商发送邮件。

相关内容