Why not adopt me?
NAME
Mail::Convert::Mbox::ToEml - convert mbox files to Outlook Express .eml files
SYNOPSIS
use Mail::Convert::Mbox::ToEml;
my $EML = Mail::Convert::Mbox::ToEml->new($file, $outdir);
die "failed to make EML file" unless" $EML->CreateEML();
DESCRIPTION
Mail::Convert::Mbox::ToEml is a module to convert Mbox mail folder which used by many unix-born software to single Outlook Express .eml files.
FUNCTIONS
new
The constructor.
$EML = Mail::Convert::Mbox::ToEml->new($file, $outdir);
$file
is the MBox file to convert.
$outdir
is the directory where the single eml files are stored.
On error the method returns undef.
CreateEML
This function do the convertion and writes the .eml file.
The two optional arguments are:
$file
is the MBox file to convert.
$outdir
is the directory where the single eml files have to be stored.
The return value is undef if the file or the ouput directory does not exist and 1 on success. If there was an error to create the eml file it will be printed out and creation will continue with the next message.
GetMessages
This method returns the subject line of all messages in the file.
Paramter: the file to process (optional)
Return: an Array of subjects or undef.
FindMessage
This method return the found messages which match the keyword in the subject line given as parameter.
Parameters: a keyword and optional a file to process
Return: a hash of hashes whith the subject line and the message number or undef.
example:
my %h = $MBX->FindMessage("RE: Help", ["d:/mail/Inbox"]);
foreach (keys %h)
{
print "The key: $_=";
foreach my $xx (keys %{$h{$_}})
{
print "$xx=" . %{$h{$_}}->{$xx} . " ";
}
print " \n";
}
GetMessageCount
This method returns the number of messages in the given file or undef.
There are no parameters.
SetFileAndDir
With this Method the input file and the output directory can be set. Parameters: filename, output directory Return 1 on success or undef if the file or the output directory does not exist.
CREDITS
Many thank's to Ivan from Broobles.com (http://www.broobles.com/imapsize/) the author of the usefull IMAPSize program for his help and tips to develop this module.
AUTHOR
Reinhard Pagitsch, <rpirpag@gmx.at>
PERL EMAIL PROJECT
This module is maintained by the Perl Email Project. It has no real maintainer. Volunteers should write to the PEP mailing list.
http://emailproject.perl.org/wiki/Mail::Convert::Mbox::ToEml
SEE ALSO
perl.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 342:
=back without =over