I'm using a script that sends mail using mail utils but now I want to send mail using sendmail can anyone help me as I was not able to get the same result from sendmail as I did from mail.
#Email Settings Message_Success="Application Backup generated successfully" Message_Failure="Problem occured while generating Application Backup please verify" Subject="Application Backup Status Mail" Recipients="email@example.com" #Check if Backup is complete if [ -e "$Backup_File" ]; then echo "Today's Backup File Exist's" >> $Log_File echo "$Message_Success" | mail -s "$Subject" "$Recipients" else echo "Today's Backup File Not Found" >> $Log_File echo "$Message_Failure" | mail -s "$Subject" "$Recipients" fi
I figured out a bit of it and here it is. But where can I define the emails subject.
echo "$Message_Success" | sendmail -f firstname.lastname@example.org "$Recipients"