Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im using a script that takes backup and sends status email using sendmail but the emails its sending comes with the to tag empty here is an image of it

Here is the part of the script

    #Email Settings
    Message_Success="Backup generated successfully"
    Message_Failure="Problem occured while generating Backup"

    Subject="Backup Status Mail"

echo "Subject:$Subject\n\n$Message_Failure" | sendmail -F $Sender_Name $Recipients

echo "Subject:$Subject\n\n$Message_Success" | sendmail -F $Sender_Name $Recipients

can it be solved so that I can see who has recieved emails. Thanks.

share|improve this question
up vote 1 down vote accepted

I'd put the recipients in the message and use sendmail's -t flag:

#Email Settings
Message_Success="Database Backup generated successfully"
Message_Failure="Problem occured while generating Database Backup please verify"
Subject="Database Backup Status Mail"

sendmail -F $Sender_Name -it <<END_MESSAGE
To: $Recipients
Subject: $Subject

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.