330 |
} |
} |
331 |
} |
} |
332 |
|
|
333 |
|
if (! $body) { |
334 |
|
$body = "[plain/text body not found]" if ($debug == 2); |
335 |
|
print STDERR "plain/text body not found\n" if ($debug); |
336 |
|
return; |
337 |
|
} |
338 |
|
|
339 |
# reformat with Text::Autoformat |
# reformat with Text::Autoformat |
340 |
my $wrap = $self->{wrap_margin}; |
my $wrap = $self->{wrap_margin}; |
341 |
if ($wrap && $body && $body =~ m/^.{$wrap}..*$/m) { |
if ($wrap && $body && $body =~ m/^.{$wrap}..*$/m) { |
|
$body =~ s/[\r\n]/\n/gs; |
|
342 |
$body = autoformat($body, {right=>$wrap, all=>1}); |
$body = autoformat($body, {right=>$wrap, all=>1}); |
343 |
$body .="\n[reformated using autoformat, margin at $wrap]" if ($debug == 2); |
$body .="\n[reformated using autoformat, margin at $wrap]" if ($debug == 2); |
344 |
} |
} |