When I use the following script:
local smtp = require("socket.smtp")
local from = "from@host"
local rcpt = "rcpt@host"
local msg = {
headers = {
to = rcpt,
subject = "Hi"
},
body = "Hello"
}
smtp.send{from = from,rcpt = rcpt,source = smtp.message(msg)}
I'm getting an error message: lua entry thread aborted: runtime error: attempt to yield across C-call boundary
.
I'm using the newest luasocket
installed from luarocks
with Lua 5.1 using nginx compiled with LuaJIT 2.1. What is causing this error message and how do I fix it?
content_by_lua_file
to see where it fails? Does it fail on thesmtp.send
orrequire
line? I suspect it's the former, but would like to confirm. – Sarsenet