8 Replies Latest reply on Nov 5, 2019 11:42 AM by Bill Robinson

    blcli Email sendMailWithAttachment not working correctly

    Parag Desai
      Share This:

      Hi Team,


      BSA 8903


      I have a NSH script job (type1) which does a for loop based on the number of targets, appends data to a single file like shown below. As you can see the blcli to send email is outside the 'for' loop. However, I receive as many email as the number of targets the 'for' loop iterates. For instance, if I have 500 targets to iterate through the loop, I receive 500 emails with the attachment.

      Am I missing something here?


      for i in $Servers


      collect info from all the servers and copy it into a //source/xyz.csv


      cp //source/xyz.csv //@/tmp

      blcli_execute Email sendMailWithAttachment $FROM $TO $SUBJECT $BODY /tmp "xyz.csv"


      Please suggest.