Just use the sendmail command. There should be plenty of documentation on how to use it to send a message from the command line.