Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Mail::IMAPTalk 1.03

    Download button

    No screenshots available
    Downloads: 342  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Rob Mueller | More programs
    Perl Artistic License / FREE
    July 18th, 2007, 10:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Mail::IMAPTalk description

    Mail::IMAPTalk is an IMAP client interface with lots of features.

    Mail::IMAPTalk is an IMAP client interface with lots of features.

    SYNOPSIS

    use Mail::IMAPTalk;

    $IMAP = Mail::IMAPTalk->new(
    Server => $IMAPServer,
    Username => 'foo',
    Password => 'bar',
    Uid => 1 )
    || die "Failed to connect/login to IMAP server";

    # Append message to folder
    open(my $F, 'rfc822msg.txt');
    $IMAP->append($FolderName, $F) || dir $@;
    close($F);

    # Select folder and get first unseen message
    $IMAP->select($FolderName) || die $@;
    $MsgId = $IMAP->search('not', 'seen')->[0];

    # Get message envelope and print some details
    $MsgEV = $IMAP->fetch($MsgId, 'envelope')->{$MsgId}->{envelope};
    print "From: " . $MsgEv->{From};
    print "To: " . $MsgEv->{To};
    print "Subject: " . $MsgEv->{Subject};

    # Get message body structure
    $MsgBS = $IMAP->fetch($MsgId, 'bodystructure')->{$MsgId}->{bodystructure};

    # Find imap part number of text part of message
    $MsgTxtHash = Mail::IMAPTalk::find_message($MsgBS);
    $MsgPart = $MsgTxtHash->{plain}->{'IMAP-Partnum'};

    # Retrieve message text body
    $MsgTxt = $IMAP->fetch($MsgId, "body[$MsgPart]")->{$MsgId}->{body};

    $IMAP->logout();

    This module communicates with an IMAP server. Each IMAP server command is mapped to a method of this object.

    Although other IMAP modules exist on CPAN, this has several advantages over other modules.

    It parses the more complex IMAP structures like envelopes and body structures into nice Perl data structures.

    It correctly supports atoms, quoted strings and literals at any point. Some parsers in other modules aren't fully IMAP compatiable and may break at odd times with certain messages on some servers.

    It allows large return values (eg. attachments on a message) to be read directly into a file, rather than into memory.

    It includes some helper functions to find the actual text/plain or text/html part of a message out of a complex MIME structure. It also can find a list of attachements, and CID links for HTML messages with attached images.

    It supports decoding of MIME headers to Perl utf-8 strings automatically, so you don't have to deal with MIME encoded headers (enabled optionally).

    While the IMAP protocol does allow for asynchronous running of commands, this module is designed to be used in a synchronous manner. That is, you issue a command by calling a method, and the command will block until the appropriate response is returned. The method will then return the parsed results from the given command.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    IMAP interface | Perl interface | Perl module | Mail::IMAPTalk | IMAP | mail

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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