php - Unable to send email using "sendmail" -
i have installed sendmail on ubuntu server 12.04.1. unable send email domain (example: www.mydomain.com) , don't see error in email log. tried update path in php.ini below
sendmail_path = /usr/sbin/sendmail -t -i
also:
sendmail_path = /usr/sbin/sendmail
the php script using send email (mydomain example, have real domain). result below code: "email not sent".
<!doctype html> <?php header("content-type: text/html; charset=utf-8") ?> <?php $subject = 'test mail subject'; $message = 'test mail body'; $to = 'anabash35@gmail.com'; if(@mail($to, $subject, $message, "noreply@mydomain.org")){ echo 'email sent'; } else{ echo 'email not sent'; } ?>
in email log (nano /var/log/mail.log), below (i can't notice error, server name server1):
oct 7 02:01:57 server1 sm-mta[4333]: r94l05at005852: to=, ctladdr= (33/33), delay=2+03:01:52, xdelay=00:00:00, mailer=esmtp,$
oct 7 02:01:57 server1 sm-mta[4333]: r94mqouw005456: to=, ctladdr= (33/33), delay=2+01:09:32, xdelay=00:00:00, mailer=esmtp,$
oct 7 02:01:57 server1 sm-mta[4333]: r94mqna8005453: to=, ctladdr= (33/33), delay=2+01:09:34, xdelay=00:00:00, mailer=esmtp,$
oct 7 02:01:57 server1 sm-mta[4333]: r94m7xbi005307: to=, ctladdr= (33/33), delay=2+01:53:58, xdelay=00:00:00, mailer=esmtp,$
i didn't touch configuration file sendmail.mc or sendmail.cf, etc.
i tried restarting service: service sendmail restart. no luck :(
would please hint me , how debug problem? many thanks.
cheers!
Comments
Post a Comment