adapt Blogger to the new api

This commit is contained in:
Xuan Sang LE
2020-05-23 20:09:01 +02:00
parent e810eb4a14
commit 7c70cf4d15
81 changed files with 1932 additions and 453 deletions

View File

@ -1,6 +1,8 @@
local data = ...
print(data.content)
-- print(data.content)
local error_msg = {}
local iserror = false
for k,v in pairs(data.to) do
print("sent to:"..v)
local to = v
@ -11,7 +13,12 @@ for k,v in pairs(data.to) do
--print(cmd)
local r = os.execute(cmd)
if not r then
print("Cannot send mail to: "..v)
iserror = true
table.insert(error_msg, v)
print("Unable to send mail to: "..v)
end
end
return "Email sent"
local result = {}
result.error = iserror
result.result = error_msg
return result