Re: Curl not marking mail as read!!

raj sourabh <[email protected]>
Newsgroups gmane.linux.redhat.general
Message-ID <CAHxMG43_+v1WThNvCAEcPJyxozZiwfQPH-zHkkdhBOj4jPuZKA@mail.gmail.com>
Thanks for your response. Well I tried writing a script in perl using
POP3client module. The below script works but I am not able to fetch the
senders email address.  ("From" tag prints the name of the sender, not the
mail :( )

*#!/usr/bin/perl -w*
*use strict;*
*use Mail::POP3Client;*
*
*
*my $user = 'username';*
*my $pass = 'password';*
*
*
*my $pop = new Mail::POP3Client(*
*        USER     => $user,*
*        PASSWORD => $pass,*
*        HOST     => "pop.gmail.com",*
*        PORT     => 995,*
*        USESSL   => 'true',*
*);*
*print "Content-type: text/html\n\n";*
*my $count = $pop->Count();*
*if ($count < 0) {*
*        print $pop->Message();*
*} elsif ($count == 0) {*
*        print "no messages\n";*
*} else {*
*#       print "$count messsages\n\n";*
*
*
*        for my $i (1 .. $count) {*
*                foreach ($pop->Head($i)) {*
*                        print "$_\n" if /^(From):/i;*
*                }*
*                print "\n";*
*        }*
*}*
*
*
*$pop->Close();*




On Mon, Aug 20, 2012 at 11:55 PM, Jonathan Billings <[email protected]>wrote:

> On Mon, Aug 20, 2012 at 3:44 PM, raj sourabh <[email protected]>
> wrote:
> > Is there anyway i can make curl to fetch only the new mails and once
> only.
>
> It looks like the atom feed is read-only, you'd have to sign in and
> mark the messages as read if you wanted to remove them from the feed.
> You'll either have to keep track of the messages you've sent a message
> to, or use something other than the read-only feed to get a list of
> email addresses.  How about writing a script that uses POP or IMAP?
>
> --
> Jonathan Billings <[email protected]>
> College of Engineering - CAEN - Unix and Linux Support
>
> --
> redhat-list mailing list
> unsubscribe mailto:[email protected]?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
-- 
redhat-list mailing list
unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.