I have an Amazon EC2 instance running with RedHat/Linux. My problem is with the PHP mail() function which is not working although I can send mail with sendmail from command line.
I run this command.
$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
XXXXX
My php.ini setting is
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i
mail.add_x_header = On
I can't figure out whats wrong. I am not getting any PHP mail error. I don't get any email as well. What could the problem be?
/var/log/maillog is
Jan 15 04:00:33 ip-xx-xx-xxx-xx sendmail[16041]: q0F90XIe016041: from=root, size=2486, class=0, nrcpts=1, msgid=<201201150900.q0F90XIe016041@ip-xx-xx-xxx-xx.eu-west-1.compute.internal>, relay=root@localhost
Jan 15 04:00:33 ip-xx-xx-xxx-xx sendmail[16042]: q0F90XvT016042: from=<root@ip-xx-xx-xxx-xx.eu-west-1.compute.internal>, size=2849, class=0, nrcpts=1, msgid=<201201150900.q0F90XIe016041@ip-xx-xx-xxx-xx.eu-west-1.compute.internal>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jan 15 04:00:33 xx-xx-xxx-xx sendmail[16041]: q0F90XIe016041: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32486, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q0F90XvT016042 Message accepted for delivery)