##---------------------------------------------------------------------------##
## $Id: mhsingle.pl,v 1.6 2001/08/25 19:56:59 ehood Exp $
## Earl Hood mhonarc@mhonarc.org
## Routines for converting a single message to HTML
##---------------------------------------------------------------------------##
## MHonArc -- Internet mail-to-HTML converter
## Copyright (C) 1995-2001 Earl Hood, mhonarc@mhonarc.org
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------
## Routine to perform conversion of a single mail message to
## Prevent any verbose output
## See where input is coming from
($handle = file_open
($ARGV[0])) ||
die("ERROR: Unable to open $ARGV[0]\n");
my($index, $fields) = read_mail_header
($handle);
$Message{$index} = read_mail_body
($handle, $index, $fields);
## Set index list structures for replace_li_var()
@MListOrder = sort_messages
();
@Index2MLoc{@MListOrder} = (0 .. $#MListOrder);
output_mail
($index, 1, 0);
close($handle) unless -t
$handle;
##---------------------------------------------------------------------------