Skip to content

Commit 6a31112

Browse files
committed
Script to extract html part from email messages
Signed-off-by: Pedro Melo <[email protected]>
1 parent 5c8bb4d commit 6a31112

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bin/x-email-extract-html-part

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env perl
2+
3+
use strict;
4+
use warnings;
5+
use Courriel;
6+
7+
binmode(\*STDOUT, 'encoding(UTF-8)');
8+
9+
my $raw_email = do {
10+
local $/;
11+
<>;
12+
};
13+
14+
my $m = Courriel->parse(text => $raw_email);
15+
my $html = $m->html_body_part;
16+
print $html->content;

0 commit comments

Comments
 (0)