Mule 如何删除电子邮件到电子邮件流中的附件?

Mule 如何删除电子邮件到电子邮件流中的附件?,mule,email-attachments,Mule,Email Attachments,我试图删除附件,以便我的出站电子邮件只包含有效负载。我使用了附件转换器,但即使我使用“*”作为过滤器,附件仍然会被发送。我已经将其放置在入站和出站端点上,但附件仍然出现在电子邮件上 <remove-attachment attachmentName="&quot;*&quot;" doc:name="Attachment"/> <flow name="ocr_app_testFlow"> <pop3:inbound-endpoint h

我试图删除附件,以便我的出站电子邮件只包含有效负载。我使用了附件转换器,但即使我使用“*”作为过滤器,附件仍然会被发送。我已经将其放置在入站和出站端点上,但附件仍然出现在电子邮件上

 <remove-attachment attachmentName="&quot;*&quot;" doc:name="Attachment"/>


<flow name="ocr_app_testFlow">
    <pop3:inbound-endpoint host="mail.awh.com.au" user="knaufack" password="ocr123" responseTimeout="10000" doc:name="POP3"/>
    <logger message="#[message.inboundProperties.subject]" level="INFO" doc:name="Logger"/>
    <remove-attachment attachmentName="*" doc:name="Attachment"/>
    <choice doc:name="Choice">
        <when expression="#[wildcard('*Succeeded*',message.inboundProperties.subject)]">
            <set-variable variableName="Subject" value="#[message.inboundProperties.subject]" doc:name="Variable"/>
            <set-variable variableName="Warehouse" value="#[message.inboundProperties.subject.substring(40,43)]" doc:name="Variable"/>
            <set-variable variableName="Order" value="#[message.inboundProperties.subject.substring(44,51)]" doc:name="Variable"/>
        </when>
        <otherwise>
            <set-variable variableName="Subject" value="#[message.inboundProperties.subject]" doc:name="Variable"/>
            <set-variable variableName="Warehouse" value="#[message.inboundProperties.subject.substring(37,40)]" doc:name="Variable"/>
            <set-variable variableName="Order" value="#[message.inboundProperties.subject.substring(41,48)]" doc:name="Variable"/>
        </otherwise>
    </choice>
    <logger message="#[flowVars.Order] from #[flowVars.Warehouse]" level="INFO" doc:name="Logger"/>
    <set-payload value="Your Order #[flowVars.Order] from #[flowVars.Warehouse] Warehouse is imported succesfully. Please Verify" doc:name="Set Payload"/>
    <remove-attachment attachmentName="*" doc:name="Attachment"/>
    <choice doc:name="Choice">
        <when expression="#[flowVars.Warehouse  == 'ROC']">
            <smtp:outbound-endpoint host="mail.awh.com.au" user="tupload" password="upload123" to="tupload@awh.com.au" from="AWH_Logistics_Integration" subject="AWH OCR Process Notification" responseTimeout="10000" doc:name="ROC Warehouse"/>
        </when>
        <otherwise>
            <smtp:outbound-endpoint host="mail.awh.com.au" user="tupload" password="upload123" to="pauldominguez@awh.com.au" from="AWH_Logistics_Integration" subject="AWH OCR Process Notification" responseTimeout="10000" doc:name="SMTP"/>
        </otherwise>
    </choice>
</flow>

  • 将附加的transformer类添加到项目中
    package org.awh.pfinder;
    导入org.mule.transport.email.transformers.ObjectToMimeMessage;
    公共类RemoveAttachmentTransformer扩展ObjectToMimeMessage{
    public RemoveAttachmentTransformer(){
    超级();
    setUseInboundAttachments(假);
    }
    
    }
    您是否尝试过
    attachmentName=“*”
    ?我不确定这种双重报价业务。嗨,大卫,是的,我也试过。这是mule在我将“*”放在附件转换器的名称字段上时生成的。您是否可以在
    org.mule.transformer.simple.RemoveAttachmentTransformer.transformMessage
    上放置一个断点,然后了解其中的情况?是否调用了
    message.removeOutboundAttachment
    ?您好,David,我不知道如何执行此操作,但我已使用调试器放置了一个断点,但附件仍然存在,即使遇到附件转换器,也不会被删除。有什么想法吗?嗯,在这一点上,我认为这是一个需要向MuleSoft报告的bug。