The idea is to turn the LED on whenever new mail is received and to turn it off when there is no unread mail. https://innovateideatecreate.wordpress.com/2015/07/04/mail-checker-using-galileo/
The Intel Galileo board that I have used has Debian Wheezy on it and it runs a python script that logs into the user account after every 60 seconds. This keeps a check on the incoming email. I have used outlook account in this project but it can be used with any other email provider such as gmail and yahoo. You must know about the IMAPClient server id of the email provider to get the email updates.
Inside the python script, there is a system call whenever new mail is received to turn the LED on or keep it off.
Accessing GPIO can be tricky . Learn more about it the link given.