Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Date: 2012mar22 OS: Linux Language: bash Q. How can I send mail from a bash script? A.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.
Add a commentSign in to add a comment