NAME

Email::Store::HTML - various HTML related functions for Email::Store::Mail

SYNOPSIS

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
}

DESCRIPTION

METHODS

on_store <Email::Store::Mail>

This finds every HTML attachment in the mail and performs various operations on them before storing them as a new Email::Store::HTML object.

raw

The raw HTML, exactly as we found it.

scrubbed

A scrubbed version of the HTML with things like javascript removed.

as_text

The HTML run through HTML::FormatText::WithLinks. Links are placed after the anchor word(a) in square brackets so that

<a href="http://thegestalt.org">HOME!</a>

becomes

HOME! [ http://thegestalt.org ]

BUGS AND TODO

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.

SUPPORT

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

AUTHOR

Simon Wistow <simon@thegestalt.org>

COPYRIGHT

Copyright 2005, Simon Wistow

This code is distributed under the same terms as Perl itself.

SEE ALSO

HTML::Scrubber, HTML::FormatText::WithLinks