in PHP

Setting up mail using SSMTP with Gmail for PHP

How to install SSMTP with Gmail for PHP.

Configure /etc/ssmtp/ssmtp.conf:

Enable ssmtp for php’s mail function:

 

Test that it works.

 

Restart apache / nginx