Emailing Multiple Attachments

Specifically, is there a way to retain the original document and attaching said document into the email? I have a process where if certain validation fails, it kicks off an attachmentEmail process and I would like to retain re-usability for this email service.

I’ve initialized a document list with attachments and mapped it to the smtp service when called, but I am getting an error saying there is no filename and content in the attachment when I’ve tried mapping/initializing those fields. I realized my problem here is that I am trying to retain a document from a virtual folder within the my webMethods server.

To clairfy more, is there a way for the smtp service to accept any document type and attach it to the email? For example, lets say I have 2 separate flow services, one processes a .xml file and the other a .txt file. The email service sends out an Exception Document regardless of the extension, but I would also like to attach the original document (located in virtual folder) from either service. Attached below is my mapping/flow service.

Hey there!
You need to initialize attachments list before calling pub.client:smtp.
Refer picture attached - it’s some common emailing flow, processing attachments from input param, then call smtp.

Hi Austin,

if you have only one attachment to attach to your email, than you can use an index on the mapping line for the attachments input.

If you require multiple Attachments in one email, than you will have to collect them in an intermediate list by using pub.list:appendToList service and then map this list to the attachments input.