so I have set out on a progect to program something to where whenever I get an E-mail it toggles a GPIO to turn on a LED can someone please help me figure out how to toggle the GPIO on my Raspberry Pi. here is what i have so far
import imaplib
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('mygmail@gmail.com','mypassword')