johnajb has asked for the wisdom of the Perl Monks concerning the following question:
################################# use Net::POP3; # Constructors $pop = Net::POP3->new('redserv1', Timeout => 60); $i = int rand(10000000000000); if ($pop->login("capturemail", "redmap") > 0) { my $msgnums = $pop->list; # hashref of msgnum => size foreach my $msgnum (keys %$msgnums) { open(MAILBOX, ">$i.eml") or die "Cannot open Mailbox file $timestamp$i.eml"; print "Writing to $i.eml\n"; $i++; my $msg = $pop->get($msgnum); print MAILBOX @$msg; # $pop->delete($msgnum); close(MAILBOX) or die "Cannot close mailbox"; } } $pop->quit;
Code tags added by davido.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: remove a blank line after a string
by davido (Cardinal) on Jan 26, 2005 at 17:10 UTC | |
by johnajb (Novice) on Jan 26, 2005 at 18:05 UTC | |
by davido (Cardinal) on Jan 26, 2005 at 18:25 UTC | |
by Roy Johnson (Monsignor) on Jan 27, 2005 at 03:40 UTC | |
by johnajb (Novice) on Jan 26, 2005 at 18:27 UTC | |
by Your Mother (Archbishop) on Jan 27, 2005 at 00:28 UTC | |
by davido (Cardinal) on Jan 27, 2005 at 06:18 UTC | |
by johnajb (Novice) on Feb 19, 2005 at 01:06 UTC | |
by davido (Cardinal) on Feb 19, 2005 at 05:38 UTC | |
| |
|
HELP delete blank line in middle of email
by johnajb (Novice) on Jan 26, 2005 at 18:25 UTC | |
by sh1tn (Priest) on Jan 26, 2005 at 18:49 UTC | |
|
Re: remove a blank line after a string
by spongeboy (Novice) on Feb 23, 2005 at 01:48 UTC | |
|
Re: remove a blank line after a string
by Frantz (Monk) on Jan 26, 2005 at 17:19 UTC | |
by johnajb (Novice) on Jan 26, 2005 at 17:33 UTC |