How to install PHP Mailer in DigitalOcean

1) If Sendmail isn’t installed, install it:

apt-get install sendmail

2) Configure hosts file correctly:

nano /etc/hosts

And make sure the line looks like this:

127.0.0.1 localhost yourhostnamehere

3) Run the sendmail config and answer ‘Y‘ to everything:

sendmailconfig

Thank you for reading this.