Attachments are not the body
authorJamie Cameron <jcameron@webmin.com>
Sat, 20 Dec 2008 07:16:46 +0000 (07:16 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 20 Dec 2008 07:16:46 +0000 (07:16 +0000)
mailboxes/folders-lib.pl

index fc2e3d2..30d88f2 100644 (file)
@@ -2153,6 +2153,7 @@ sub find_body
 {
 local ($a, $body, $textbody, $htmlbody);
 foreach $a (@{$_[0]->{'attach'}}) {
+       next if ($a->{'header'}->{'content-disposition'} =~ /^attachment/i);
        if ($a->{'type'} =~ /^text\/plain/i || $a->{'type'} eq 'text') {
                $textbody = $a if (!$textbody && $a->{'data'} =~ /\S/);
                }