Hi. So I’m having problems using SMTP.
Right now I’m following this reference:
http://w3.impa.br/~diego/software/luasocket/old/luasocket-2.0-beta/smtp.html
Here is my current code.
[code]
– load the smtp support
local smtp = require (“smtp”)
from = ""
rcpt = {
“”,
}
mesgt = {
headers = {
to = "xxxxxxx ",
subject = “Hello”
},
body = “Testing 123”
}
r, e = smtp.send{
from = from,
rcpt = rcpt,
source = smtp.message(mesgt),
user = “xxxxxxx”,
password = “xxxxxxx”,
server = “smtp.gmail.com”,
port = “465”,
}
[/code]
I have all the files (smtp.lua, ltn12.lua, mime.lua, and tp.lua) from the LuaSocket library copied into my project folder.
Right now I’m getting the following error message:
Runtime error: …/main.lua:24: attempt to index local ‘smtp’ (a boolean value)
Would anyone be able to walk me through this? Or possible point me in the right direction? I’d appreciate any help! Thank you!
[import]uid: 19931 topic_id: 7443 reply_id: 307443[/import]