I installed sendmail with PHP and apache on Ubuntu. When I try to execute the following command
php -r "mail(' test@gmail.com ', 'test', 'test')"'
he successfully sends an email.
However, by running the file "test_send_mail.php" with
<?php mail(' test@gmail.com ', 'test', 'test') ?>
Don't send an email.
A failed .php file attempt generates a log entry:
`Jul 5 21:24:47 www sendmail[25603]: p661OlL7025603: from=www-data, size=106, class=0,
nrcpts = 0, msgid = < 201107060124.p661OlL7025603@www.server.com >, relay = www-data @localhost
A successful command line attempt generates a log entry:
Jul 5 21:22:40 www sm-mta[25533]: p661MevV025533: from=< root@www.server.com >, size=352, class=0, nrcpts=1, msgid=< 201107060122.p661Mecm025532@www.server.com >, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Does anyone know what could happen? Thanks for the help!