You cannot create mails with all files of a folder as attachments with the original MIMETools, because you cannot iterate with the in-tag over the original boundary-tag (internally it's a blockContinuations-tag).
The NMIMETools will give you two new tags: nmime & nboundary. Both have the same arguments as the original MIMETools-counterparts. The difference between the MIMETools and the NMIMETools is that the nboundary-tag is now a "real-open-and-close-block"-tag: it must be opened and closed! This will give you the chance to iterate with the in-tag over the nboundary-block. (For some compatibilty with the MIME-RFC's and the original MIMETools: Nesting nmime-tags in nmime-tags is possible, but for most problems this need not to be used at all.)
Here's an example of how to send all files of a folder:
<dtml-sendmail smtphost="127.0.0.1"> To: [email protected] From: [email protected] Subject: NMIME-Example with multiple attachments <dtml-nmime type="text/plain" encode="7bit"> Just a demonstration how to send multiple attachments with the NMIMETOOLS. <dtml-in "objectValues('File')"><dtml-nboundary type_expr="content_type" disposition="attachment" encode="base64" filename_expr="_['sequence-item'].getId()"><dtml-var sequence-item></dtml-nboundary></dtml-in></dtml-nmime> </dtml-sendmail>