Write your solution (for linux systems). Create a file /bin/GMAIL with the following text:
\r
#!/bin/bash
read var2 var1=$(curl -u LOGIN:PASS --silent "
https://mail.google.com/mail/feed/atom" | grep -c "")
if [ "$var1" -le "$var2" ]
then
echo "No new emails"
read var3 echo "Last email: $var3"
else
curl -u LOGIN:PASS --silent "
https://mail.google.com/mail/feed/atom" | tr-d '\' | awk -F " '{for (i=2; i<=NF; i++) {print $i}}' | perl -pe 's/^(.*)<\\/title>.*(.*)<\\/name>.*$/$2 — $1/'>/root/theme
var3=$(iconv -t UTF-8 /root/theme)
google calendar add "$var3"
fi
echo "$var1">/root/flag
\r
\r
The username and password in the text of the specified mailbox. In the terminal write:
\r
chmod +x /bin/GMAIL
\r
Then download, build and a custom package from Google calendar from the command line:
code.google.com/p/googlecl/ On the project page there are full instructions on how to install and configure. To set need for the calendar to which you have subscribed to receive SMS.
If done correctly, it remains only to configure the startup script /bin/GMAIL for the crown. Create a file /home/user/tst with the text:
\r
SHELL=/bin/bash
MAILTO=user
0-59 * * * * /bin/GMAIL
\r
Write in the terminal:
\r
crontab /home/user/tst
touch /home/user/theme /home/user/flag
\r
It's all finished. Now once a minute, your computer checks mail and if there's a new email — creates an event in Google calendar with the author and subject, which will come via SMS:). Also, you can now check mail "whip hand" simply by writing in the console GMAIL — find out whether there is unread mail and the author with the title of the last letter :)