Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MIME::Parser

Status
Not open for further replies.

tar565

Programmer
Jan 24, 2005
39
0
0
IE
I am using this module to get the body of a mail. When I execute the script below, 2 file are generated one html and one txt file. However both files are randomly named (it seems). I wish to specify the name of the .txt file and html files, (call them NewMsg.txt and NewMsg.html) respectively.

Code below :

$Msg_Path = 'V:/Test/md50000004264.msg';

open(FH, $Msg_Path) or die "Cannot open file $!";
my $FileString = do { local $/; <FH> };
close(FH);

my $parser = new MIME::parser;
$entity = $parser->parse_data($FileString);
 
Have you had a look at MIME::parser::Filer ?

Mike

shows ways to help with Tsunami Relief.

You cannot really appreciate Dilbert unless you've read it in the
original Klingon.

Want great answers to your Tek-Tips questions? Have a look at faq219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top