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("email@example.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("firstname.lastname@example.org",,"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
Do you have 2 AE Servers?
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).
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.
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?
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.