NAME
Mail::Message::ToHTML - convert text format mail to HTML format
SYNOPSIS
... lock by something ...
use Mail::Message::ToHTML;
my $obj = new Mail::Message::ToHTML {
charset => "euc-jp",
directory => "/var/www/htdocs/ml/elena",
};
$obj->htmlify_rfc822_message({
id => 1,
src => "/var/spool/ml/elena/spool/1",
});
... unlock by something ...
This module itself provides no lock function. please use flock() built
in perl or CPAN lock modules for it.
DESCRIPTION
Message structure created as HTML
HTML-fied message has following structure. something() below is method
name.
for example
-------------------------------------------------------------------
html_start()
...
mhl_preamble()
mhl_separator()
message header
From: ...
Subject: ...
mhl_separator()
message body
mhl_separator()
mhl_footer()
html_end()
METHODS
new($args)
$args = {
directory => $directory,
};
$directory is top level directory where html-fied articles are stored.
htmlify_rfc822_message($args)
convert mail to html.
$args = {
id => $id,
path => $path,
};
where $path is file path.
is_ignore($id)
we should not process this $id
METHODS for index and thread
cache_message_info($msg, $args)
save information into DB. See section "Internal Data Presentation" for
more detail.
update_msg_html_links($id)
update link relation around $id.
update_id_index($args)
update index.html.
update_monthly_id_index($args)
update_thread_index($args)
update thread.html.
update_monthly_thread_index($args)
internal utility functions for IO
internal utility functions for HTML TAGS
"_print_something()" internal function provides wrapper to print HTML
tags et.al.
useful functions as entrance
htmlify_file($file, $args)
try to convert rfc822 message $file to HTML.
$args = {
directory => "destination directory",
};
htmlify_dir($dir, $args)
try to convert all rfc822 messages to HTML in $dir directory.
$args = {
directory => "destination directory",
};
TODO
expiration
sub directory?
CODING STYLE
See "http://www.fml.org/software/FNF/" on fml coding style guide.
AUTHOR
Ken'ichi Fukamachi
COPYRIGHT
Copyright (C) 2002,2003,2004,2005,2006 Ken'ichi Fukamachi
All rights reserved. This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
HISTORY
Mail::Message::ToHTML first appeared in fml8 mailing list driver
package. See "http://www.fml.org/" for more details.
This class is renamed from "Mail::HTML::Lite" 1.40 (2001-2002).