2014-05-24 10:30:18

SMPT Error: Could not connect to SMTP host on Redhat

You might run in to the error "SMTP Error: Could not connect to SMTP host." when using Drupal or PHP, yet you have no idea why the mail function does not work, as everything else is properly configured.

It might have to do with a boolean set on system level. Specifically this one: httpd_can_sendmail.

Run this from your command line:
sudo setsebool -P httpd_can_sendmail 1

Try sending an e-mail again, and everything should be working as normal.