Command line mail message with postfix in (K)ubuntu


You have installed postfix in your local development machine (sudo apt-get install postfix), and you want to test sending emails from the command line using mail



You would first need to install the mailutils package:

sudo apt-get install mailutils

then you can send an email by:

CC: (leave blank)
Subject: Test subject
Main message body

and you can send it by pressing Ctrl+D