[interchange] Add proper MIME headers for UTF-8 plain text emails.

Stefan Hornburg interchange-cvs at icdevgroup.org
Tue Oct 26 09:28:54 UTC 2010


commit 9bf8c86746dff5ccecccc6d6d75a8c3917abef99
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Tue Oct 26 11:27:11 2010 +0200

    Add proper MIME headers for UTF-8 plain text emails.

 code/UserTag/email.tag |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/code/UserTag/email.tag b/code/UserTag/email.tag
index 3854eb9..7beff84 100644
--- a/code/UserTag/email.tag
+++ b/code/UserTag/email.tag
@@ -216,6 +216,12 @@ sub {
 		push(@extra, "Bcc: $bcc");
 	}
 
+	if ($utf8 && ! $opt->{mimetype}) {
+		push(@extra, 'MIME-Version: 1.0');
+		push(@extra, 'Content-Type: text/plain; charset=UTF-8');
+		push(@extra, 'Content-Transfer-Encoding: 8bit');
+	}
+	
 	$ok = send_mail($to, $subject, $body, $reply, 0, @extra)
 			unless $sent_with_attach;
 



More information about the interchange-cvs mailing list