From: Moritz Bunkus Date: Wed, 13 Dec 2006 08:47:39 +0000 (+0000) Subject: MIME-Quoting der Betreff-Zeile: Leerzeichen als "_" ausgaben; "_" in Hex quoten ... X-Git-Tag: release-2.4.0^2~56 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=231412071142f1ca5a20d86fb5e090b795400996;p=kivitendo-erp.git MIME-Quoting der Betreff-Zeile: Leerzeichen als "_" ausgaben; "_" in Hex quoten (siehe RFC 2047 4.2); Hex-Zahlen mit Grossbuchstaben. --- diff --git a/SL/Mailer.pm b/SL/Mailer.pm index 1a377f367..453603ff1 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -55,17 +55,18 @@ sub mime_quote_text { for (my $i = 0; $i < length($text); $i++) { my $char = ord(substr($text, $i, 1)); - if (($char < 33) || ($char > 127) || - ($char == ord('?')) || ($char == ord(' '))) { + if (($char < 32) || ($char > 127) || + ($char == ord('?')) || ($char == ord('_'))) { if ($chars_left < 5) { $new_text .= "?=\n $q_start"; $chars_left = 75 - $l_start; } - $new_text .= sprintf("=%02x", $char); + $new_text .= sprintf("=%02X", $char); $chars_left -= 3; } else { + $char = ord('_') if ($char == ord(' ')); if ($chars_left < 5) { $new_text .= "?=\n $q_start"; $chars_left = 75 - $l_start;