hey this script sounds promising but only works until line 25, because i get this error.
Code:
Conky: desktop window (1e00d6b) is subwindow of root window (13c)
Conky: window type - override
Conky: drawing to created window (0x5800001)
Conky: drawing to double buffer
Can't locate Mail/POP3Client.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/gargintua/scripts/email.pl line 25.
BEGIN failed--compilation aborted at /home/gargintua/scripts/email.pl line 25.
Can't locate Mail/POP3Client.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/gargintua/scripts/email.pl line 25.
BEGIN failed--compilation aborted at /home/gargintua/scripts/email.pl line 25.
my script looks like this excluding account info.
Code:
#!/usr/bin/perl
# beginning of configuration
# pop3 host
$pop_host = "pop3.live.com";
# pop3 username
$pop_user = "user";
# pop3 password
$pop_pass = "pass";
# ssl port number
$ssl_port = "995";
# ssl protocol
$ssl_prot = "tcp";
# number of emails to show
$dis_numb = "5";
# end of configuration def. POP3Client
use Mail::POP3Client;
use IO::Socket::SSL;
my $socket = IO::Socket::SSL->new( PeerAddr => $pop_host,
PeerPort => $ssl_port,
Proto => $ssl_prot);
my $pop = Mail::POP3Client->new();
$pop->User($pop_user);
$pop->Pass($pop_pass);
$pop->Socket($socket);
$pop->Connect();
$msg_count = $pop->Count();
for ($i = $msg_count, $j = 0; $i >= $msg_count-($dis_numb-1); $i--, $j++) {
foreach ( $pop->Head( $i ) ) {
#/^(From|Subject):\s+/i and print $_, "\n";
if ($_ =~ m/^From:/) {
($from) = ($_ =~ m#^From: .*<(.*)>#);
$from = substr($from, 0, 30);
$out .= "$j = $from\n";
}
}
#chop $out;
`echo -e "$out"> ~/.gmail/.gmail_top`;
}
$pop->Close();
i tried the linked thread but it contains nothing conky related
Thanks, nick
Bookmarks