Email::Store::HTML - various HTML related functions for Email::Store::Mail
my $mail = Email::Store::Mail->retrieve( $msgid ); exit unless $mail->html; for ($mail->html) { print $_->raw; # prints out the raw HTML version of the attachment print $_->scrubbed; # prints out a scrubbed version of the mail which should be safe print $_->as_text; # prints out a version of the HTML converted to plain text }
This finds every HTML attachment in the mail and performs various operations on them before storing them as a new Email::Store::HTML object.
Email::Store::HTML
The raw HTML, exactly as we found it.
A scrubbed version of the HTML with things like javascript removed.
The HTML run through HTML::FormatText::WithLinks. Links are placed after the anchor word(a) in square brackets so that
HTML::FormatText::WithLinks
<a href="http://thegestalt.org">HOME!</a>
becomes
HOME! [ http://thegestalt.org ]
No bugs known at the moment.
It might be nice to give people access to to the scrubber and formatter so that they could change the options.
This module is part of the Perl Email Project - http://pep.kwiki.org/
There is a mailing list at pep@perl.org (subscribe at pep-subscribe@perl.org) and an archive available at http://nntp.perl.org/group/pep.php
Simon Wistow <simon@thegestalt.org>
Copyright 2005, Simon Wistow
This code is distributed under the same terms as Perl itself.
HTML::Scrubber, HTML::FormatText::WithLinks
To install Email::Store::HTML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Store::HTML
CPAN shell
perl -MCPAN -e shell install Email::Store::HTML
For more information on module installation, please visit the detailed CPAN module installation guide.