Automic Workload Automation

 View Only
  • 1.  Attaching file in Post Process SEND_MAIL task

    Posted May 28, 2018 12:18 PM

    Hi,

     

    I am writing a script in the Post Process Tab of an Unix Job which would send a file from the same server as an attachment in a mail. Below is the code snippet - 

     

    :SET &OUT# = SEND_MAIL("abc@xyz.com",,"Meeting","Meeting today at 5pm", "/home/sample472.txt")
    :PRINT &OUT#

     

    But it throwing the error code - "50014" - Attachment does not exist.

     

    I thought that this is happening due to Server & Login not specified. I tried the same as below - 

     

    :SET &OUT# = SEND_MAIL("abc@xyz.com",,"Meeting","Meeting today at 5pm", "/home/sample472.txt", "CCD110", "LOGIN.CCD110.UAT")
    :PRINT &OUT#

     

    AE - One Automation 2013 (Dialog Version - 9.00A Build 514-8C1)

     

    Please suggest how to resolve this and how to use the Server & Login in the code if i need to.

     

    Thanks in Advance



  • 2.  Re: Attaching file in Post Process SEND_MAIL task

    Posted May 28, 2018 02:11 PM

    Hi

     

    Do you have 2 AE Servers?

     

    Docu:

    This script element always sends emails via the Automation Engine. Files that should be attached must be stored on the computer of the AutomationEngine or be accessible from there (UNC path).

    Automic 

     

    Means: if you have 2 AE Server its mandatory to provide the file(s) on both locations as AE is not able to predict which WP (on which server) the send_mail will execute.

     

    cheers Wolfgang



  • 3.  Re: Attaching file in Post Process SEND_MAIL task

    Posted May 29, 2018 06:55 AM

    Hi,

     

    The file is present in a different Unix Server. How do we make SEND_MAIL point to that Unix Server and not the default AE Server. I saw the syntax is as - 

     

    SEND_MAIL(Receiver, [Cc], Subject, Text, [Attachment],[Agent, Login Object] | [_SERVER, _DEFAULT])

     

    But the same is throwing the too many parameter Error (Screenshot above). How can i configure that correctly?



  • 4.  Re: Attaching file in Post Process SEND_MAIL task

    Posted May 29, 2018 08:51 AM

    Hi,

    As Wolfgang already wrote, in AE Version 9.00 it is not possible to send attachments from anywhere else except of the AE Server.

    Therefore, you need to copy that file somewhere, where the AE Server can access it (create an ftp job to transfer the file to the AE server or share it over network)

    The second option would be to send it directly via unix with the sendmail command.

    It would be also possible to attach your file as an output file to your unix job (:REGISTER_OUTPUTFILE) and then use a notification object to send reports via “Attach Reports” but I would recommend the first or second option.

    Regards