Changeset

3836:070faeaf51bc

mod_email: Allow sender to override content-type
author Matthew Wild <mwild1@gmail.com>
date Sun, 05 Jan 2020 10:48:23 +0000
parents 3835:5258f0afa8b4
children 3837:7440cffe30e2
files mod_email/mod_email.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_email/mod_email.lua	Sat Jan 04 19:48:35 2020 +0100
+++ b/mod_email/mod_email.lua	Sun Jan 05 10:48:23 2020 +0000
@@ -14,7 +14,9 @@
 		};
 	end
 	headers.To = to;
-	headers["Content-Type"] = 'text/plain; charset="utf-8"';
+	if not headers["Content-Type"] then
+		headers["Content-Type"] = 'text/plain; charset="utf-8"';
+	end
 	local message = smtp.message{
 		headers = headers;
 		body = content;