Drupal, CentOS, SMTP, & SELinux

Submitted by bart on Fri, 06/22/2018 - 14:17

Setting up Drupal 8 SMTP module to send through my GMail account.

It failed every time I tried testing it with an error complaining about connecting to the server. Turns out selinux was getting in the way.

To allow Apache to send emails, I first verified selinux was in the way.

>sudo sestatus -b | grep -i sendmail
httpd_can_sendmail                          off
logging_syslogd_can_sendmail                off

To turn "on/off" the flag