5 hours ago
You cannot use Luasocket library for sending emails from the web server context (apps).
Attached is a modified single file version of this library: https://github.com/GUI/lua-resty-mail/
It should work from both scripts and apps. You can create a user library named mail and load it like this:
Check the link above for examples and options reference.
Attached is a modified single file version of this library: https://github.com/GUI/lua-resty-mail/
It should work from both scripts and apps. You can create a user library named mail and load it like this:
Code:
local mail = require('user.mail')Check the link above for examples and options reference.