IDoc to Mail (with attachment) scenario
I have a simple IDoc to Mail scenario. The payload is send as mail attachment.
The IDoc is mapped to a structure representing the attachment-file format.
The <b>mail adapter</b> is set up as follows:
<i>Use Adapter-Specific Message Attributes</i> and <i>Variable Transport Binding</i> are checked.
I also use Modul <i>StrictXml2PlainBean</i> to convert the Payload into FlatFile-Format.
And I use the Modul <i>MessageTransformBean</i> to set up the Payload as attachment and to set up the name of the attachment. I use these parameters:
Transform.ContentDisposition = attachment;filename=test.txt Transform.ContentType = text/plain
The result is an Email with two files as attachment.
The first file contains the payload in FlatFile-Format as expected, but there is also a second file (XML-Format) with information about the message.
1. How can I get rid of the XML-File? I dont need it and it doesn't help the receiver of the Email, its just confusing.
2. How can I set up a dynamic name for the attachment from the paylaod ?
Thanks for your help.