Hi Daniel,
Could you please try to multiply the Attachment field like below?
--Attachment[1]
SET OutputLocalEnvironment.Destination.Email.Attachment[1].ContentName = attachmentFileName;
SET OutputLocalEnvironment.Destination.Email.Attachment[1].ContentType = 'text/html';
SET OutputLocalEnvironment.Destination.Email.Attachment[1].Content = BASE64DECODE(InputRoot.XMLNSC.SVC1035A_EmailMessage.ATTACHMENT_DATA[1]);
--Attachment[2]
SET OutputLocalEnvironment.Destination.Email.Attachment[2].ContentName = attachmentFileName2;
SET OutputLocalEnvironment.Destination.Email.Attachment[2].ContentType = 'text/html';
SET OutputLocalEnvironment.Destination.Email.Attachment[2].Content = BASE64DECODE(InputRoot.XMLNSC.SVC1035A_EmailMessage.ATTACHMENT_DATA[2]);
------------------------------
Burak Görener
ist
+90262646 50 11
------------------------------
Original Message:
Sent: Mon February 26, 2024 11:59 AM
From: Daniel Friberg
Subject: ACE12 Email output node. Multiple attachments?
Hi,
We are using the email output node to send "dynamic email messages" with the compute node and ESQL. Everything is working except I can't send more than one attachment per email.
To send an email with multiple attachments, see:
But there is no information there about multiple attachments.
I have guessed and tried to put the second attachment after the first attachment in the message tree but only the first instance is sent (see code & screenshot).
What am I doing wrong?
Best regards,
Daniel
Relevant ESQL:
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentEncoding = 'base64';
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentName[1] = attachmentFileName;
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentName[2] = attachmentFileName2;
SET OutputLocalEnvironment.Destination.Email.Attachment.Content[1] = BASE64DECODE(InputRoot.XMLNSC.SVC1035A_EmailMessage.ATTACHMENT_DATA[1]);
SET OutputLocalEnvironment.Destination.Email.Attachment.Content[2] = BASE64DECODE(InputRoot.XMLNSC.SVC1035A_EmailMessage.ATTACHMENT_DATA[2]);
SET OutputLocalEnvironment.Destination.Email.Attachment.ContentType = 'text/html';