Author Topic: gmail no email receive heartbeat notification  (Read 274 times)

Offline adizero

  • Member
  • **
  • Posts: 259
gmail no email receive heartbeat notification
« on: July 25, 2016, 03:15:35 PM »

Mga Bro

meron kami daily alert message sa gmail,  Ex "status quezon "  "status Caloocan "  etc....
pero not all the time natitignan namin lahat.  meron na ba kayo na try na magmonitor and magalert kapag hindi nakareceive ng email na may specific na subject sa gmail inbox ?

Example filtering thru email subj    "status quezon city"


Online jeremypv

  • Member
  • **
  • Posts: 914
    • jeremypv.net
Re: gmail no email receive heartbeat notification
« Reply #1 on: July 26, 2016, 10:28:50 AM »
we have a very simple script like that that checks the email

Code: [Select]
curl -k -u <user>:<pass> https://mail.google.com/mail/feed/atom

output is xml, like this one
<?xml version="1.0" encoding="UTF-8"?><feed version="0.3" xmlns="http://purl.org/atom/ns#"><title>Gmail - Inbox for ########</title><tagline>New messages in your Gmail Inbox</tagline><fullcount>0</fullcount><link rel="alternate" href="https://mail.google.com/mail" type="text/html" /><modified>2016-07-26T02:25:43Z</modified></feed>
jeremypv

Offline adizero

  • Member
  • **
  • Posts: 259
Re: gmail no email receive heartbeat notification
« Reply #2 on: July 26, 2016, 01:56:30 PM »

Thanks jeremypv.     Gumana ito.   pero walang date.   Mas ok sana kung meron date to trigger na walang email for today

curl -u user:pass --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' *)<\/title>.*?<name>(.*?)<\/name>.*$/$2 - $1/'