(Solved) How to add mulitiple email attachments

****** Edit: Solved

Never mind…

        table.insert(t) works, I had a typo elsewhere in my code.

       This post can get deleted.

*************

Hey gang,

I’m stumped here for some reason.

I’m trying to add multiple email attachments, but I can’t figure out how to programmically add the required tables to an existing attachment table.

I can add a single attachment like this:

attachment = { baseDir=system.DocumentsDirectory, filename="Screenshot.png", type="image" },

but when I need to dynamically create an array of these tables, I’m stumped.

attachment = { { baseDir=system.DocumentsDirectory, filename="Screenshot.png", type="image" }, { baseDir=system.ResourceDirectory, filename="MyLogo.png", type="image" }, },

I can see attachment is a table, but I don’t know how to add tables inside the parent table without indexes or keys as I continue to add more attachment tables.

table.insert doesn’t seem to do the trick.

Any ideas would be appreciated.

Nail