background has asked for the wisdom of the Perl Monks concerning the following question:
Not:<a href="http://www.blahblah.com/article.html">The Article Link</a>
my code is below. any thoughts? please note, the script below is only designed for capturing the header / body of a single email.The Article Link
many thanks...#!/usr/bin/perl -w use strict; use Mail::POP3Client; my $user = 'blahblahblah'; my $pass = 'blahblahblah'; my $pop = new Mail::POP3Client( USER => $user, PASSWORD => $pass, HOST => "pop.gmail.com", PORT => 995, USESSL => 'true', ); my $count = $pop->Count(); if ($count < 0) { print $pop->Message(); } elsif ($count == 0) { print "no messages\n"; } else { for my $i (1 .. $count) { open(STDOUT, ">my_txt_output.txt"); my $fh = new IO::Handle(); $fh->fdopen( fileno( STDOUT ), "w" ); $pop->HeadAndBodyToFile( $fh, $i ); close STDOUT; } } $pop->Close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I capture HTML code from my POP3 email body
by ikegami (Patriarch) on Oct 14, 2008 at 19:15 UTC | |
by background (Novice) on Oct 14, 2008 at 22:37 UTC | |
|
Re: How can I capture HTML code from my POP3 email body
by perreal (Monk) on Oct 14, 2008 at 22:53 UTC |