sudo apt-get install python-pip
IMAPClien needs to be installed for python.
sudo pip install imapclient
https://learn.adafruit.com/raspberry-pi-e-mail-notifier-using-leds/prepare-python http://mitchtech.net/connect-raspberry-pi-to-gmail-facebook-twitter-more/