title: Sending a mail from shell scripting
body: <p>I write a script for scheduling backup process .In that script i want to trigger a mail to the corresponding user and admin user as " Backup completed successfully for the $username at $date $time.what can i do .then which packages i need to install ...? please help me...!</p>
  
  <pre><code>#!/bin/bash
  
  echo "---welcome to File Backup process---" 
  
  whoami
  
  #echo "--Please enter your public Key name--"
  #read username
  
  username=$(whoami)
  
  echo "username:$username"
  
  rsync -avz --delete --exclude=".bash_history" --exclude=".bash_logout" --exclude=".bashrc" --exclude=".cache*" --exclude=".profile" --exclude=".ssh*" /home/$username/ $username@server:/home/$username/
  
  echo "--Backup completed--"
  </code></pre>