echo hello | mail -s 'Subject of this mail' <receiver-address>Where <receiver-address> is where you want the mail to go. It can be just the userid on this box or a full mail address such as firstname.lastname@example.org Also you can use $USER to send mail to the user that is running the script.
Programming Tips - How can I send mail from a bash script?
Date: 2012mar22 OS: Linux Language: bash Q. How can I send mail from a bash script? A.