Contact Us 1-800-596-4880

Set Parsing Text File Attachment as Body Message

When Anypoint Connector for Email (Email Connector) receives a message without a body and only an attachment file with Content-Type as text, the attachment file is not processed as a separate file. Instead, the file is included in the message body as plain text. Mule apps can use this behavior to receive the data in the message body instead of as an attachment file.

To change the behavior of parsing attached text files when the file is the only content in the message, set the system property parsing.text.attachment.as.body to either of these values:

  • true (default)
    Preserves the previous behavior and converts the text file attachment in the body message.

  • false
    Adds the attachment text file to the attachment list in the payload.

To learn how to set system properties in Anypoint Studio or for on-premises deployments, refer to the system properties documentation.

Jakarta Mail System Properties

Email Connector uses the Jakarta Mail library internally. Thereby, you can change certain aspects of connector behavior by changing specific Jakarta Mail system properties. Refer to the troubleshoot Jakarta Mail system properties section that covers some of the most used Jakarta Mail system properties.

For detailed information on these system properties, refer to the Jakarta Mail documentation.

View on GitHub