mod_offline_email/mod_offline_email.lua
changeset 3409 bd71c97de1d0
parent 1285 f1a0a0754b87
child 4235 ee724c7fa8e0
--- a/mod_offline_email/mod_offline_email.lua	Thu Dec 13 14:32:17 2018 +0100
+++ b/mod_offline_email/mod_offline_email.lua	Sun Dec 16 13:54:53 2018 +0100
@@ -2,7 +2,10 @@
 local jid_bare = require "util.jid".bare;
 local os_time = os.time;
 local t_concat = table.concat;
+
+prosody.unlock_globals(); -- LuaSocket wants to pollute the global scope
 local smtp = require "socket.smtp";
+prosody.lock_globals();
 
 local smtp_server = module:get_option_string("smtp_server", "localhost");
 local smtp_user = module:get_option_string("smtp_username");