summaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-04 13:08:07 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-04 13:08:07 +0000
commitcd60c1621b2f90aede6584a490aa2a8abf897980 (patch)
treee023d12aa6d25dbc6d9c2a1e4df8bae0ce1a4955 /lualib
parent86b6603191816516d196d252e14f5c692b8c7887 (diff)
downloadrspamd-cd60c1621b2f90aede6584a490aa2a8abf897980.tar.gz
rspamd-cd60c1621b2f90aede6584a490aa2a8abf897980.zip
[Minor] Allow rspamd_text objects to be sent via SMTP
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_smtp.lua2
1 files changed, 1 insertions, 1 deletions
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)