send mail in linux using mail command code example
Example 1: linux mail command
mail -s "This is the subject" [email protected] <<< 'This is the message'
Example 2: Sending a Simple Email From Linux Terminal
$ echo -e "\nSending regards from Terminal." | msmtp -a outlook [email protected]