我似乎无法弄清楚如何能够做到以下几点:邮件在一个邮件从入站文件连接多个文件
1)骡子需要从目录拿起文件,并把它放在一个ftp (这部分正在工作)
2)接下来,它需要邮寄上传到单个邮件中的文件,邮件正文中提到了上传文件的文件名。
=>这第二部分我不明白如何使用骡块来做到这一点。我尝试使用不同的属性范围将我的文件名保存在列表中,但每次到达聚合块时,我的所有属性都消失了(包括会话属性)。这些文件虽然汇总,但我也需要文件名。
我在这里错过了一些明显的东西吗?谢谢!
这里是我的xml:
<flow name="KCM-FTP" doc:name="KCM-FTP">
<file:inbound-endpoint responseTimeout="10000" doc:name="File" path="${path.kcm.uploadfolder}"></file:inbound-endpoint>
<message-properties-transformer doc:name="Message Properties">
<add-message-property key="MULE_CORRELATION_ID" value="1"/>
<add-message-property key="MULE_CORRELATION_GROUP_SIZE" value="100"/>
</message-properties-transformer>
<ftp:outbound-endpoint host="${ftp.host}" port="${ftp.port}" path="${path.ftp.inputfolder}" user="${ftp.username}" password="${ftp.password}" responseTimeout="10000" doc:name="FTP"></ftp:outbound-endpoint>
<collection-aggregator timeout="15000" failOnTimeout="false" doc:name="Collection Aggregator"></collection-aggregator>
<message-properties-transformer doc:name="Message Properties">
<add-message-property key="EmailHeader" value="#['KCM uploader \n Run: ' +server.dateTime + '\n\nFiles uploaded:\n']"></add-message-property>
</message-properties-transformer>
<foreach doc:name="For Each">
<set-attachment attachmentName="test" value="#[payload]" contentType="text/plain" doc:name="Attachment"/>
</foreach>
<smtp:outbound-endpoint host="${smtp.host}" port="${smtp.port}" to="${mail.to}" subject="${mail.subject}" responseTimeout="10000" doc:name="SMTP" from="${mail.from}"></smtp:outbound-endpoint>
</flow>