Mail is part of the mailx i.e mailutils on Ubuntu so we will install this first.
Note: mailutils will also spawn the postfix installation. instead of having postfix ask us a lot of questions during install we will install postfix interactively
DEBIAN_FRONTEND=noninteractive apt install -y postfix apt install mailutils
mail [ options ] -s [ subject ] [recipient_address]