I am trying to setup my website (LAMP stack, CentOS 6.9) on Google compute engine. I use PHPMailer to send mails (Registration, Singup, Login, etc.)
I have setup smtp & all that good stuff in G-Suite & in my PHPMailer calls. But my mails don't go through. Most other people have solved this issue with
sudo setsebool -P httpd_can_sendmail 1 sudo setsebool -P httpd_can_network_connect 1
But in my case setsebool does not take effect (evident from below). And when I run setsebool as root, it gets killed!
[me]$ sudo setsebool -P httpd_can_sendmail 1 [me]$ sudo setsebool -P httpd_can_network_connect 1 [me]$ getsebool httpd_can_sendmail httpd_can_sendmail --> off [me]$ getsebool httpd_can_network_connect httpd_can_network_connect --> off // Try as root & it gets killed by ...? [me]$ sudo su - [root]# setsebool -P httpd_can_sendmail 1 Killed
Obviously I am missing something. Maybe google does not allow this. Any pointers will be greatly appreciated!