lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thanks!  I've been enjoying getting acquainted with the beta.  A
tangible form of appreciation is bug reports, no?

When I use

   require'smtp'

in a script that sends a message, I get the following (wrapped) error
message...

   ...local/zzzsge/src/lua/luasocket-2.0-beta/lua/smtp.lua:34: attempt
   to call field `try' (a nil value)

I made it work with this tweak...

sge:49$ diff -u lua/smtp.lua.ORIG lua/smtp.lua
--- lua/smtp.lua.ORIG   Fri Jun 18 17:29:26 2004
+++ lua/smtp.lua        Sun Jun 20 22:27:54 2004
@@ -106,7 +106,7 @@
     local tp = socket.try(tp.connect(server or SERVER, port or PORT, TIMEOUT))
     local s = setmetatable({tp = tp}, metat)
     -- make sure tp is closed if we get an exception
-    local try = socket.newtry(function() s:close() end)
+    s.try = socket.newtry(function() s:close() end)
     return s 
 end

On http://www.tecgraf.puc-rio.br/luasocket/smtp.html, I think the
non-MIME example needs a comma after the first } in the definition of
mesgt.

Keep up the good work,
Steve

-- 
How wonderful it is that nobody need wait a single moment
before starting to improve the world.       -- Anne Frank
Paradise is exactly where you are
right now...only much, much better.    -- Laurie Anderson