I want to send a simple email on Lua, I used the example in official documentation , and returns me always nil
. Example:
-- load the smtp support
local smtp = require("socket.smtp")
from = "<[email protected]>"
rcpt = {
"<[email protected]>",
"<[email protected]>",
"<[email protected]>"
}
mesgt = {
headers = {
to = "Fulano da Silva <[email protected]>",
cc = '"Beltrano F. Nunes" <[email protected]>',
subject = "My first message"
},
body = "I hope this works. If it does, I can send you another 1000 copies."
}
r, e = smtp.send{
from = from,
rcpt = rcpt,
source = smtp.message(mesgt)
}
It says:
host or service not provided, or not know