Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Mail::Box 2.105

    Download button

    No screenshots available
    Downloads: 420  Tell us about an update
    User Rating:
    Rated by:
    Poor (1.4/5)
    5 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mark Overmeer | More programs
    Perl Artistic License / FREE
    July 6th, 2012, 09:40 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Mail::Box description

    Can manage a mailbox, a folder with messages.

    Mail::Box can manage a mailbox, a folder with messages.

    INHERITANCE

    Mail::Box
    is a Mail::Reporter

    Mail::Box is extended by
    Mail::Box::Dir
    Mail::Box::File
    Mail::Box::Net


    SYNOPSIS

    use Mail::Box::Manager;
    my $mgr = Mail::Box::Manager->new;
    my $folder = $mgr->open(folder => $ENV{MAIL}, ...);
    print $folder->name;

    # Get the first message.
    print $folder->message(0);

    # Delete the third message
    $folder->message(3)->delete;

    # Get the number of messages in scalar context.
    my $emails = $folder->messages;

    # Iterate over the messages.
    foreach ($folder->messages) {...} # all messages
    foreach (@$folder) {...} # all messages

    $folder->addMessage(Mail::Box::Message->new(...));
    Tied-interface:
    tie my(@inbox), 'Mail::Box::Tie::ARRAY', $inbox;

    # Four times the same:
    $inbox[3]->print; # tied
    $folder->[3]->print; # overloaded folder
    $folder->message(3)->print; # usual
    print $folder->[3]; # overloaded message

    tie my(%inbox), 'Mail::Box::Tie::HASH', $inbox;

    # Twice times the same
    $inbox{$msgid}->print; # tied
    $folder->messageId($msgid)->print;# usual


    A Mail::Box::Manager creates Mail::Box objects. But you already knew, because you started with the Mail::Box-Overview manual page. That page is obligatory reading, sorry!

    Mail::Box is the base class for accessing various types of mailboxes (folders) in a uniform manner. The various folder types vary on how they store their messages, but when some effort those differences could be hidden behind a general API. For example, some folders store many messages in one single file, where other store each message in a separate file withing the same directory.

    No object in your program will be of type Mail::Box: it is only used as base class for the real folder types.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Perl module | Perl library | manage mailbox | Mail | Perl | module

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM