Command Line – How to Send an Email from Terminal?

command linedevelopmentemailscript

How to send an email from command line or script? I want to be able to run the script programmatically by passing the receiver and the message.

Best Answer

mail -s subject someone@example.com type your message, press Ctrl+D to finish