Greetings folk monks,
I'm currently rewriting a script that used Net::POP3 and Mail::Internet to use the Mail::Box series of modules.
I've been scouring the documentation for Mail::Box and have managed to get most things working - except for displaying a message, either as part of a loop or individually.
What follows is the basic script I'm using:
#! /usr/bin/perl -w # ignoring -T - just testing. use strict; use Mail::Box::Manager; die "Usage: $0 message_number\n" unless @ARGV==1; my $msg_num = shift @ARGV; my $mailspool = "/var/spool/mail/baz"; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open($mailspool); # Get message specified on command line. my $message $folder->message($msg_num); print $message; $folder->close;
This code runs without errors and returns
Or some other reference to a hash, so I changed print $message to print %$message, only to get the same output.Mail::Box::Mbox::Message=HASH(0x84c560)
I'm not finding anything helpful in the Mail::Box-Cookbook or Mail::Box::Mbox::Message manpages.
Is there something that I'm missing here? My code is basically the same as that shown in the Mail::Box manual!
Could someone please enlighten me, please?
I've only found one node ( Mail::Box-addMessage vs. Net::Pop3 ) that even mentions Mail::Box, and it's not relevant to this problem.
Cheers,
BazB.
In reply to Problems displaying a single message with Mail::Box by BazB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |