how to send mail from script linux code example
Example 1: linux mail command
mail -s "This is the subject" [email protected] <<< 'This is the message'
Example 2: bash send email from script
$ cat /path/to/file | mail -s "your subject" [email protected]