Curl not marking mail as read!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I am trying to write a script which respond to all the mails received on my
gmail account. I am able to get the sender's email address successfully
using curl (check below). But the problem here is, this is not marking the
mail as read and/or it is fetching all the email addresses everytime the
script runs.

Is there anyway i can make curl to fetch only the new mails and once only.

*#!/bin/bash*
*
*
*var=$(curl -u gmail_username:gmail_password --silent '
https://mail.google.com/mail/feed/atom' | tr -d '\n' | awk -F '<entry>'
'{for (i=2; i<=NF; i++) {print $i}}' | sed -n
's/<title>\(.*\)<\/title.*email>\(.*\)<\/email>.*/\2 /p')*
*
*
*for i in $var*
*do*
*echo $i*
*done*


Please suggest.

Thanks for help.
Raj
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux