Error – mail: command not found

I recently built a server and got the following error when running a script that sends an email:

mail: command not found

To resolve this I installed the mailutils package:

sudo apt-get install mailutils