I moved a PHP-mail-script from an Apache-server to the the root folder of an Nginx-Server (Ubuntu 12.0.4 LTS, MySQL, PHP5-FPM). The form was working perfectly on the Apache-server, however, on the the nginx-server I am getting an ERROR-message, when I try to send mails.
phpinfo() returns the following details regarding the mail settings:
php-fpm - active
mail.add_x_header - On
mail.force_extra_parameters - no value
mail.log - no value
sendmail_from - no value
sendmail_path - /usr/sbin/sendmail -t -i
The php.ini states the following:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
/var/log/mail.log states the following:
Jan 27 10:11:49 localhost sendmail[22457]: My unqualified host name (localhost) unknown; sleeping for retry
Jan 27 10:12:49 localhost sendmail[22457]: unable to qualify my own domain name (localhost) -- using short name
Jan 27 10:12:50 localhost sendmail[22457]: gethostbyaddr(192.241.186.7) failed: 1
Jan 27 10:12:50 localhost sendmail[22457]: gethostbyaddr(10.128.248.128) failed: 1
Jan 27 10:12:50 localhost sendmail[22457]: alias database /etc/mail/aliases rebuilt by root
Jan 27 10:12:50 localhost sendmail[22457]: /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total
Jan 27 10:12:50 localhost sm-mta[22516]: My unqualified host name (localhost) unknown; sleeping for retry
Jan 27 10:12:52 localhost sm-msp-queue[22521]: My unqualified host name (localhost) unknown; sleeping for retry
Jan 27 10:13:50 localhost sm-mta[22516]: unable to qualify my own domain name (localhost) -- using short name
Jan 27 10:13:50 localhost sm-mta[22516]: gethostbyaddr(192.241.186.7) failed: 1
Jan 27 10:13:50 localhost sm-mta[22516]: gethostbyaddr(10.128.248.128) failed: 1
Jan 27 10:13:50 localhost sm-mta[22523]: starting daemon (8.14.4): SMTP+queueing@00:10:00
Jan 27 10:13:52 localhost sm-msp-queue[22521]: unable to qualify my own domain name (localhost) -- using short name
Jan 27 10:14:10 localhost sendmail[22542]: My unqualified host name (localhost) unknown; sleeping for retry
Jan 27 10:15:10 localhost sendmail[22542]: unable to qualify my own domain name (localhost) -- using short name
Jan 27 10:15:10 localhost sendmail[22542]: s0RFFAmY022542: from=www-data, size=423, class=0, nrcpts=1, msgid=<201401271515.s0RFFAmY022542@$
Jan 27 10:15:10 localhost sm-mta[22546]: s0RFFAC7022546: from=<www-data@localhost>, size=638, class=0, nrcpts=1, msgid=<201401271515.s0RFF$
Jan 27 10:15:10 localhost sendmail[22542]: s0RFFAmY022542: to=example@outlook.com, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00$
Jan 27 10:15:11 localhost sm-mta[22548]: s0RFFAC7022546: to=<example@outlook.com>, ctladdr=<www-data@localhost> (33/33), delay=00:00:01, $enter code here
Does that indicate that PHP Mail() is not correctly set up on my server?
I would appreciate your advice.