diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index fa030d9e2..ca0302e1a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,7 @@ 7.3.6 - fix: Checkbox is no longer available when creating custom profile fields - fix: profile fields do not ever set the default value + - fix: CS email message shows up as an attachment 7.3.5 diff --git a/lib/WebGUI/Mail/Get.pm b/lib/WebGUI/Mail/Get.pm index 2cb3892cd..bb034a2c2 100644 --- a/lib/WebGUI/Mail/Get.pm +++ b/lib/WebGUI/Mail/Get.pm @@ -213,7 +213,8 @@ sub getNextMessage { @parts = reverse @parts; } - foreach my $part (@parts) { + #foreach my $part (@parts) { + while ( my $part = shift @parts) { my $type = $part->mime_type; next if ($type eq "message/rfc822"); next if ($type eq "message/delivery-status"); @@ -224,9 +225,12 @@ sub getNextMessage { my $content = ""; if (defined $body) { $content = $body->as_string; + } else { + # handle nested multipart + $alternate = 1; + unshift(@parts, reverse $part->parts); } next unless ($content); - # If this is a multipart alternative message, and this is the first segment # Or if this is a normal mime message if (($alternate && !@segments) || !$alternate) {