olax / prosody-modules

Automatically exported from code.google.com/p/prosody-modules
MIT License
0 stars 0 forks source link

add utf8 to mod_offline_email #73

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Patch:

--- public/mod_offline_email/mod_offline_email.lua      2015-03-18 
16:37:14.913135638 +0100
+++ mod_new_offline_email/mod_new_offline_email.lua     2014-10-22 
18:49:57.000000000 +0200
@@ -31,12 +31,14 @@
                headers = {
                        to = address;
                        subject = subject or ("Offline message from "..jid_bare(from_address));
+            ["content-type"] = 'text/plain; charset="utf-8"';
                };
                body = message_text;
        };

        local ok, err = smtp.send{ from = smtp_address, rcpt = rcpt, source = smtp.message(mesgt),
-               server = smtp_server, user = smtp_user, password = smtp_pass };
+               server = smtp_server, user = smtp_user, password = smtp_pass
+    };

        if not ok then
                module:log("error", "Failed to deliver to %s: %s", tostring(address), tostring(err));

Original issue reported on code.google.com by Viktor.M...@gmail.com on 18 Mar 2015 at 3:54