PtokaX forum

Development Section => Extensions for PtokaX Lua => Topic started by: st0ne-db on 20 September, 2006, 22:30:35

Title: PXLuaSocket-2.0.1 and SMTP Support??
Post by: st0ne-db on 20 September, 2006, 22:30:35
First i want to thank PPK for compiling this lib ;D

But... Im having a little trouble with it.. was hoping someone might be able to help me.
Im using the Lua 5.0.3 version and am loading it as instructed by PPK's post...


libinit = loadlib("pxluasocket.dll", "luaopen_pxluasocket");
libinit();


Im trying to use the smtp functions as explaind in the docs..
The docs instruct you to load the module like this:


-- loads the SMTP module and everything it requires
local smtp = require("socket.smtp")


I know we must load it a different way in Ptoka... I have been sucessfull getting the lib to work outside
of Ptoka using the win32 distro on LuaForge.

after loading the socket lib in PX.. the table 'socket' is available.. but 'socket.smtp' is not.
only basic socket funtions are there...


socket = { _DEBUG, dns, gettime, newtry, protect, select, sink, skip, sleep, source, tcp, try, udp, _VERSION }


Can someone tell me how to load the smtp module in Lua 5.0.3 / PtokaX or if its even supported.

Thanks,

-St0ne_db
Title: Re: PXLuaSocket-2.0.1 and SMTP Support??
Post by: bastya_elvtars on 20 September, 2006, 22:36:52
I'll take a look.
Title: Re: PXLuaSocket-2.0.1 and SMTP Support??
Post by: PPK on 20 September, 2006, 23:36:02
smtp.lua (yes it is script, not compiled part of library) is included in archive with PXLuaSocket ::)