[Nottingham] Perl Strip HTML module?
Richard Bagshaw
richard at bagshaw.co.uk
Mon Nov 13 01:14:11 GMT 2006
Thanks for this, I am actually using this module and didn't notice that method,
-----Original Message-----
From: Michael Erskine [mailto:msemtd at yahoo.co.uk]
Sent: Wednesday, November 08, 2006 02:03 PM GMT Standard Time
To: nottingham at mailman.lug.org.uk
Subject: Re: [Nottingham] Perl Strip HTML module?
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
_______________________________________________
Nottingham mailing list
Nottingham at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/nottingham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/nottingham/attachments/20061113/03c34b7b/attachment.html
More information about the Nottingham
mailing list