[Nottingham] Perl Strip HTML module?
Michael Erskine
msemtd at yahoo.co.uk
Wed Nov 8 14:03:06 GMT 2006
On Wednesday 08 November 2006 13:16, Richard Bagshaw wrote:
> Hi Guys,
>
> I'm writing some code that basically checks a pop mailbox and puts the
> information into a mysql database, however if the person sends an email
> in HTML format it looks messy, I am looking for a perl module that will
> convert it to plain text or just strip the HTML. Does anyone have any
> ideas on a module to-do this?
Mail::Box looks promising
use Mail::Message::Convert::HtmlFormatText;
my $af = Mail::Message::Convert::HtmlFormatText->new;
my $plain_body = $af->format($body);
see
http://perl.overmeer.net/mailbox/html/Mail::Message::Convert::HtmlFormatText/index.html
Regards,
Michael Erskine.
--
Moon, n.:
1. A celestial object whose phase is very important to hackers. See
PHASE OF THE MOON. 2. Dave Moon (MOON at MC).
Send instant messages to your online friends http://uk.messenger.yahoo.com
More information about the Nottingham
mailing list