How to Fix the Infamous "Error sending email" on Drupal 8/CentOS 7

I had this problem recently on this site that was really baking my noodle. It turned out to be a mixture of SELinux and reCAPTCHA misconfiguration.

First, check if SELinux allows the web server to send emails from your site:

$ su -
# getsebool httpd_can_sendmail

If the boolean is off, turn it permanently on:

# setsebool -P httpd_can_sendmail 1

Drupal 8 on Centos 7 with Nginx and PostgreSQL

This article details the steps needed to install Drupal 8 on CentOS with Nginx as a web server and PostgreSQL as a database. At the time of writing, CentOS 8 is still in the works, so we will use the current CentOS 7 release instead, 7.6.1810. Since Drupal 8 requires a more modern version of PHP than the one supplied by CentOS 7 (PHP 5.4), we will use Remi Collet’s RHEL repository to install PHP 7.3. Follow the instructions on Remi’s site to install and enable the Enterprise Linux 7 repository, remi-release-7.rpm.