http://www.perlmonks.org?node_id=70600


in reply to Getmail perl script

I'm with sauveant on this one. Why not use Mail::POPClient or Net::POP3? And you surely should look at one of them for clues on handling POP3 protocol stuff.

A POP3 box is supposed to return a "UIDL" Unique IDentifier for each message. You could use that as part of the filename. You really want Net::POP3.

--
$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
Re: Re: Getmail perl script
by bastard (Hermit) on Apr 07, 2001 at 02:05 UTC
    I agree with both extremely and sauveant. Use a module. It'll save you alot of time and has the benefit of (probably) a good bit of testing.

    What I want to know is thats the difference between them. I looked over the docs and they both look roughly the same (more stuff in Mail::POPClient). I'm using Mail::POPClient in my "yet another mail client" (trust me it's different :)), but am interested to hear of any pros/cons of each.

    xf86, To handle attachements and the like, look into MIME-tools

      I'm not sure there are any hard and fast rules, but for both the POP and IMAP sets (which have Net:: and Mail:: modules) I'd use the Mail:: versions for a client and the Net:: versions for a biffer or other status check. The Net:: versions are light(er) weight and have the methods for talking to the server; good candidates for subclassing if you wanted to do more yourself.