]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow rspamd_text objects to be sent via SMTP
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 4 Nov 2019 13:08:07 +0000 (13:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 4 Nov 2019 13:08:07 +0000 (13:08 +0000)
lualib/lua_smtp.lua

index 05667992b07ea82e4628903739b4a31b5eee32d3..a15f1ae17b526a1feab5f41fbaec2c844f2ac242 100644 (file)
@@ -107,7 +107,7 @@ local function sendmail(opts, message, callback)
     -- DATA stage
     local function data_done_cb(merr, mdata)
       if no_error_read(merr, mdata, '3') then
-        if type(message) == 'string' then
+        if type(message) == 'string' or type(message) == 'userdata' then
           conn:add_write(pre_quit_cb, {message, CRLF.. '.' .. CRLF})
         else
           table.insert(message, CRLF.. '.' .. CRLF)