14 Replies Latest reply on Nov 27, 2016 1:21 PM by kpm

    Send email with attachment

    Amit Jain Seasoned Veteran

      Hello Team,

      My requirement is to send an email with attachment. I can use the Email Task to achieve this functionality though my requirement is little different.


      I need to attach .csv file in the mail only if file contains the data. If file does not contain the data then no email should be send.


      I can’t use TgtSuccessRows > 0 because I have multiple targets in my mapping.


      I tried with the following UNIX command but no luck.


      mailx -s "User Data"  -a "User_Data.csv"  "amit.jain@abc.com" fi;

      Error: illegal option – a


      mutt -s "User Data"  -a "User_Data.csv"  "amit.jain@abc.com" fi;

      Error: mutt:  not found


      uuencode USER_DATA.csv USER_DATA.csv | mailx -s "User Data"  "amit.jain@abc.com" fi;

      I am getting an email but without attachment.


      Can you please help me out to achieve this functionality? It’s Urgent, please ! Thank You.



      Amit Jain