I have configured an outbound channel to send the payload (xml) as an attachment. When I leave the "Subject" field in the Channel configuration blank, the attachment file name looks like this,"HostPartnerName_TradingPartnerName_DocumentType" without the file extension. If I supply the "Subject" field with the value, the file name gets replaced with the subject and the file extension still is missing.
I would like to receive a file name in a format like "batch_b2b.messageId.xml". The property b2b.messageId gets the value from the Mediator. The composite that passes the information like the b2b properties has been made generic to handle different Trading Partners, so for a channel that uses SFTP, I have used the Filename format and supplied the value as "batch_%MSG_ID%.xml". Is there a way I can do the same for Email channel?
Attachment name can be set from the middleware using below header (as per the mode of integration used) -
1. For AQ mode of integration, use actionName -
2. For JMS mode of integration use custom JMS header - jca.jms.JMSProperty.ATTACHMENT_NAME to populate the name.
3. For fabric (default) mode of integration, use b2b.attachmentName header