Processing email attachments using Mule ESB is easy. The following Mule configuration checks an IMAP email inbox for new emails. The attachments are converted to a string and then saved to a file.
The key to processing attachments is to use a expression-transformer which pulls the list of attachments which can be used by the list-message-splitter-router. This allows the one-line groovy script to extract the inputstream of the attachment payload and write it to a file with a date time stamp.
MuleSoft provides the most widely used integration platform for connecting any application, data source or API, whether in the cloud or on-premises. With Anypoint Platform®, MuleSoft delivers a complete integration experience built on proven open source technology, eliminating the pain and cost of point-to-point integration. Anypoint Platform includes CloudHub™ iPaaS, Mule ESB™, and a unified solution for API management™, design and publishing.