Send a message with the content of message.txt to the mail directory of local user username

sendmail

sendmail {{username}} < {{message.txt}}

click the source code to copy install sendmail on any operating system with command-not-found.com