Php mail and sendmail hangs

emailsendmail

I'm trying to send mail via PHP's mail() function, but it hangs the script. I tried using sendmail on command line (CentOS 5.8) as was suggested in many posts I've read but it also hangs. This is what im putting in:

sendmail -v myemail@mail.com < message.txt

which says:

myemail@mail.com... Connecting to [127.0.0.1] via relay...

and that's it. It hangs there.

Here are the last 2000 lines of logs from /var/log/maillog: logs

I'm clueless as to how to continue debugging this issue, please advise.

Best Answer

I've uninstalled sendmail and postfix and then installed postfix again. That fixed it for for me.

I did this:

$ yum remove sendmail
$ yum remove postfix
$ yum install postfix
$ service postfix start
Related Topic