Mail::Convert::Mbox::ToEml - convert mbox files to Outlook Express .eml files
use Mail::Convert::Mbox::ToEml; my $EML = Mail::Convert::Mbox::ToEml->new($file, $outdir); die "failed to make EML file" unless" $EML->CreateEML();
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.
The constructor.
$EML = Mail::Convert::Mbox::ToEml->new($file, $outdir);
$file is the MBox file to convert.
$file
$outdir is the directory where the single eml files are stored.
$outdir
On error the method returns undef.
This function do the convertion and writes the .eml file.
The two optional arguments are:
$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.
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.
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"; }
This method returns the number of messages in the given file or undef.
There are no parameters.
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.
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.
Reinhard Pagitsch, <rpirpag@gmx.at>
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
perl.
1 POD Error
The following errors were encountered while parsing the POD:
=back without =over
To install Mail::Convert::Mbox::ToEml, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Convert::Mbox::ToEml
CPAN shell
perl -MCPAN -e shell install Mail::Convert::Mbox::ToEml
For more information on module installation, please visit the detailed CPAN module installation guide.