How to install PHP Mailer in DigitalOcean

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

2) Configure hosts file correctly:

And make sure the line looks like this:

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

Thank you for reading this.