------------------------------------------------ On Mon, 25 Aug 2003 15:02:08 -0500, "Dan Muey" <[EMAIL PROTECTED]> wrote:
> > > > Say for instance you have a pop3 account with 1000 messages > > in it. You > > > have a list of 10 Message-Id's from the header of ten of those > > > messages. > > > > > > You could log in, grab the header foreach message and if it has a > > > Message-Id that matches then do what you will with it. Log out; > > > > > > This will work but going through 1000 messages for ten messages is > > > quite over kill; > > > > > > Anyone know of a faster way/function/module that you could do > > > something like: > > > > > > use Mail::POP3Client; > > > my $pop = .....; > > > > > > my $message = > > > > > $pop->HeadAndBody('<[EMAIL PROTECTED] > > > 38>'); > > > > > > Or grab the msgnum via Message-Id > > > > > > my $msgnum = > > > > > $pop->GrabNumViaMessageId('<[EMAIL PROTECTED] > > fuu.hdw6324rhfn238>'); > > > my $message = $pop->HeadAndBody($msgnum); > > > > > > Any ideas??? Or am I stuck iterating throught tons of messages and > > > checking them all for the proper Message-Id header? > > > > > > > I *believe* that the Mail::Box suite can do something very > > similar. I know there has been quite a bit of work done on it > > to make operations like this very speedy. Personally I > > haven't used this particular chunk of functionality from that > > distro, but I have used other parts and they worked well. > > http://perl.overmeer.net/mailbox/ > > Thanks! > It does have a find(),messageId(),and messageIds() now all I have to > do is figure out how to use log into a pop3 account with it and use those! > Sorry I forgot to include the "obligatory" Mail::Box has a *bit* of a learning curve as compared to most other mail handling modules and a performance/memory hit for small tasks, but honestly it is worth it once you get over the hump or have to do a lot of handling. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]