1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Email::MIME;
if(my $parsed = Email::MIME->new($rawmessage))
{
my $absender = $parsed->header('From');
my @parts = $parsed->parts;
my $textinhalt;
for my $part (@parts)
{
if(scalar @{$part->{'parts'}} > 0)
{
for my $part (@{$part->{'parts'}})
{
next if($part->content_type =~ m#text/html#);
$textinhalt .= $part->body;
}
}
}
}
ungetestet, aber lässt sich ausbauen, denke ich.