--- trunk/MWS.pm 2004/05/08 02:21:50 23 +++ trunk/MWS.pm 2004/05/08 16:06:58 25 @@ -330,11 +330,16 @@ } } + if (! $body) { + $body = "[body of this message not found]\n" if ($debug == 2); + $body .= $message->decoded->string; + } + # reformat with Text::Autoformat my $wrap = $self->{wrap_margin}; if ($wrap && $body && $body =~ m/^.{$wrap}..*$/m) { - $body =~ s/[\r\n]/\n/gs; $body = autoformat($body, {right=>$wrap, all=>1}); + print "reformatted [$wrap]:\n$body\n" if ($debug == 2); $body .="\n[reformated using autoformat, margin at $wrap]" if ($debug == 2); }