Show imap_cache_test.pl syntax highlighted
#!/usr/bin/perl
use lib '/home/tkay/src/duckmail/lib';
use warnings;
use strict;
use IMAPCache;
use Data::Dumper;
use MIME::Parser;
print "Password: ";
`stty -echo`;
my $password = <STDIN>;
chomp $password;
`stty echo`;
print "\n";
my $c;
# Throws exception on invalid stuff
$c = new IMAPCache('tick.uoregon.edu', 'tkay', $password);
print "Trying to get Message 4:\n";
my $h = $c->getHeaders('inbox', 2);
print Dumper($h);
#my $m = $c->getMessage('inbox', 4);
#print Dumper($m);
#my $parser = new MIME::Parser();
#my $entity = $parser->parse_data($m);
#print Dumper($entity);
$c->release;
See more files for this project here