From 8d277a7d9e029a36736c0e505c6a9458f402cee1 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 18 Jul 2017 19:26:20 +0200 Subject: lumail: remove on_message because it breakes attachments --- config/lumail/lumail.lua | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'config') diff --git a/config/lumail/lumail.lua b/config/lumail/lumail.lua index cd8f381..42e0337 100644 --- a/config/lumail/lumail.lua +++ b/config/lumail/lumail.lua @@ -205,34 +205,3 @@ do end end --- --- Add Content-Type to the headers before sending --- -function on_message_send(path) - local content = {} - local added = false - local is_header = "^%a+: .*" - for l in io.lines(path) do - -- If this message was replaced by mimegpg don't mess with it - if (l == "-----BEGIN PGP SIGNATURE-----") or (l == "-----BEGIN PGP MESSAGE-----") then - return - end - - -- Find the last header. - if not added - and content[#content] and string.match(content[#content], is_header) - and not string.match(l, is_header) - then - -- Append Content-Type to the headers. - table.insert(content, "Content-Type: text/plain; charset=UTF-8\n") - added = true - end - table.insert(content, l.."\n") - end - - -- write the new content - local m = io.open(path, "w") - m:write(unpack(content)) - m:close() -end - -- cgit v1.2.3