How do I use mail () with redhat, I can not send mail

advertisements

I am experiencing a problem since a week.... I installed a redhat web server 6 and I upload my file. It work but nor the form. When I want to send a form, I got this error message :

object(SocketException) {
    [protected] _attributes => array()
    [protected] _messageTemplate => ''
    [protected] _responseHeaders => null
    [protected] message => 'Could not send email.'
    [protected] code => (int) 500
    [protected] file => '/var/www/step/lib/Cake/Network/Email/MailTransport.php'
    [protected] line => (int) 76
}

The form use the mail() function of PHP.

I have no idea, what should I configure on my redhat web server to let him send e-mail.

The ports smtp, www, ssh are open

I also install postfix but it did not solve my problem.

Someone know what can I do? Should I installed something and how to configure it?

Many thank for your help in order to use the function mail()


"fatal: chdir /var/spool/postfix: Permission denied" can be solved with:

setsebool -P httpd_can_network_connect 1

See: http://chirale.wordpress.com/2013/04/24/apache-centos-6-cannot-send-email/