summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--email_in.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/email_in.pl b/email_in.pl
index 02d00a3e2..ca7a29735 100644
--- a/email_in.pl
+++ b/email_in.pl
@@ -294,7 +294,8 @@ sub get_text_alternative {
foreach my $part (@parts) {
my $ct = $part->content_type || 'text/plain';
my $charset = 'iso-8859-1';
- if ($ct =~ /charset=([^;]+)/) {
+ # The charset may be quoted.
+ if ($ct =~ /charset="?([^;"]+)/) {
$charset= $1;
}
debug_print("Part Content-Type: $ct", 2);