You have several options,
If file sizes are small, iterate through
<attachments>
and for each attachment, decode using the script mediator and write to a file with syntax like,<property name="transport.vfs.ReplyFileName" expression="expression-to-compute-file-name" scope="transport"/> <property action="set" name="OUT_ONLY" value="true"/> <send> <endpoint> <address uri="vfs:file:///home/user/test/out"/> </endpoint> </send>
If the files are large then it's more efficient to write your own class mediator