From: Vsevolod Stakhov Date: Mon, 4 Nov 2019 13:08:07 +0000 (+0000) Subject: [Minor] Allow rspamd_text objects to be sent via SMTP X-Git-Tag: 2.2~88 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cd60c1621b2f90aede6584a490aa2a8abf897980;p=rspamd.git [Minor] Allow rspamd_text objects to be sent via SMTP --- diff --git a/lualib/lua_smtp.lua b/lualib/lua_smtp.lua index 05667992b..a15f1ae17 100644 --- a/lualib/lua_smtp.lua +++ b/lualib/lua_smtp.lua @@ -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)