http://qs1969.pair.com?node_id=31824

Item Description: Module for interfacing with a POP3 server using RFC1939.

Review Synopsis:

Description

Mail::POP3Client implements an Object Oriented interface to a POP3 server using RFC1939. It is quite easy to use.

Why use MAIL::POP3Client?

  • You want to easily access a POP3 server with Perl.

    Why NOT use Mail::POP3Client?

  • You are accessing an IMAP server :-).

    Example

    use Mail::POP3Client; $pop = new Mail::POP3Client( USER => "me", PASSWORD => "mypassword", HOST => "pop3.do.main" ); for( $i = 1; $i <= $pop->Count(); $i++ ) { foreach( $pop->Head( $i ) ) { /^(From|Subject):\s+/i && print $_, "\n"; } } $pop->Close();

    Personal Notes

    MAIL::POP3Client is the module I used when writing pemail, a command line MUA. I found the module to be very intuitive and straightforward. Writing pemail and using this module are what really got me into Perl programming. I highly recommend this module for any programs that require POP3 server access.

  • Replies are listed 'Best First'.
    RE: Mail::POP3Client
    by runrig (Abbot) on Sep 13, 2000 at 22:04 UTC
      Can anyone explain the difference between Mail::POP3Client and Net::POP3, why I'd use one or the other?
      The only difference I see looking at them is the RFC #'s.
        Personally, in pemail, I chose Mail::POP3Client over Net::POP3 because Mail::POP3Client offered more methods for accessing the pop3 server, specifically the Head(MESSAGE_NUMBER), Body(MESSAGE_NUMBER), and HeadAndBody(MESSAGE_NUMBER [, PREVIEW_LINES]) methods. They allowed easy access to parts of the message that you wanted without necessarily grabbing the entire message. Other than that and a few very minor differences in setting up the server connection, they are very similar and I say use whichever you prefer as they essentially provide the same functionality. I just overall found Mail::POP3Client a bit easier to work with for a Perl neophyte. :)

        xjar

    Re: Mail::POP3Client
    by Anonymous Monk on Apr 27, 2003 at 03:42 UTC
      In attempting to use Mail::POP3Client to access mail on an OpenBSD 3.2 system running popa3d, I have found that I get an error in my daemon log: "Authentication failed for UNKNOWN USER". I can connect to this pop server via telnet to 110 and issue the USER and PASS commands successfully. Running the pop server through a script in inetd.conf to pipe through tee - to capture my input and output to the pop server - I see that a successful connection yeilds one "^M" after each line - and my example perl script yeilds two control M's. Does anyone have a clue how I can either get around this - or perhaps recommend a different module to use with the popa3d? Thanks - weenie
        I posted this question before joining the Monestary. This is my Question - so if anyone has an answer you can send it on to me - thanks.

        Weenie