Processing email attachments with Mule

June 17 2011

1 comment. 0
motif

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.


We'd love to hear your opinion on this post

One Response to “Processing email attachments with Mule”

  1. This is almost identical to what I need to do, but I need to extract the attachments and save them using their original filenames. Any suggestions about how to modify this workflow to do that?

    Agree(0)Disagree(0)Comment