31.05.2018, 10:24
See this thread: https://forum.logicmachine.net/showthread.php?tid=394
Code:
if #buffer > 1 then
data = table.concat(buffer, '\r\n')
-- send file as report.csv with text/csv mime type
res, err = mailattach('someone@example.com', 'Report for 2016', 'CSV file attached', 'report.csv', data, 'text/csv')
log(res, err)
end