Hi
I’ve been racking my brains for hours on this and I think I’m missing something obvious. I can’t see how to send multiple attachments programatically ?
I thought that I could do it by creating a string containing the attachment data, formatted to create a table, see below:
{ { baseDir=system.DocumentsDirectory, filename=“monthly-marketing-reporting.pptx”, type=“text” }, { baseDir=system.DocumentsDirectory, filename=“testtest.lua”, type=“text” }, },
and doing the following in my ‘send email’ method:
local htmlStart = “<html><body>”
local htmlEnd = “</body></html>”
local options =
{
to = { mailTo },
cc = { mailCC },
subject = mailSubject,
isBodyHtml = true,
body = “” … htmlStart … mailBody … “<p><p>” … htmlEnd,
attachment = _G.documentsString
}
native.showPopup(“mail”, options)
The key part being the ‘attachment = _G.documentsString’. I was hoping this would evaluate the contents of the string and create an appropriate table as needed by the attachment option.
Can anyone lend me a helping hand on this one ?
Cheers - Steve