26.07.2018, 07:01
Hi
Try something like that
Use email function from here
https://forum.logicmachine.net/showthrea...94#pid1994
BR
Try something like that
Code:
ecgFail = grp.tag('ecgFailure')
total = 0
buffer = { 'Name' }
for index, value in ipairs(ecgFail) do
if value.data == true then
total = total + 1
name = value.name
end
buffer[ #buffer + 1 ] = table.concat({
name,
}, ',')
end
csv = string.char(0xEF, 0xBB, 0xBF) .. table.concat(buffer, '\r\n')
res, err = mailattach('someone@example.com', 'Report', 'CSV file attached', 'report.csv', csv, 'text/csv')
log('Found '..total..' ECG(s) with failure. Id´s: '..name)
Use email function from here
https://forum.logicmachine.net/showthrea...94#pid1994
BR
------------------------------
Ctrl+F5
Ctrl+F5