Skip to content

Instantly share code, notes, and snippets.

@dswhite42
dswhite42 / gmail_checker_for_blink1.py
Last active September 29, 2021 08:48
Python script to check GMail and trigger blink(1) when new messages are found
# Check mail and trigger the blink(1) when new mail is found
import os, sys, imaplib, email, getopt, time
from subprocess import Popen, DEVNULL
class MailBlinker():
def __init__(self, quiet=False):
# GMail username/password
self.username = 'your_gmail_username'