1

我正在使用Mule 3.4,并尝试从邮件中的文件夹发送文件。

控制台显示:

connector.file.mule.default.receiver.01] org.mule.transport.file.FileMessageReceiver: Lock obtained on file: C:\Users\bekbol\Documents\smtp\test.txt

我的配置文件如下:

<flow name="outcomingSmtp" doc:name="outcomingSmtp">
    <file:inbound-endpoint path="${file.outcomingSmtp}" responseTimeout="100000" doc:name="File" pollingFrequency="10000" moveToDirectory="${file.outcomingBackupSmtp}">
    <file:filename-wildcard-filter
        pattern="*.txt" />
    <file:file-to-string-transformer doc:name="File to String"/>
    </file:inbound-endpoint>
    <object-to-byte-array-transformer doc:name="Object to Byte Array"/>
    <smtp:outbound-endpoint host="${smtp.host}" port="${smtp.port}" user="${email.username}" password="${email.password}" to="${header.to}" from="${header.from}" subject="${header.subject}" responseTimeout="100000" mimeType="text/plain" doc:name="SMTP">
    <email:string-to-email-transformer doc:name="String to Email"/>
    </smtp:outbound-endpoint>
</flow>

4

1 回答 1

0

我认为你不需要

<file:file-to-string-transformer doc:name="File to String"/>

嵌套在你的<file:inbound-endpoint>. 关闭后立即将其移出</file:inbound-endpoint>

消除<object-to-byte-array-transformer doc:name="Object to Byte Array"/>

于 2013-10-14T13:35:56.103 回答