Skip to content

Instantly share code, notes, and snippets.

View poanchen's full-sized avatar

PoAn (Baron) Chen poanchen

View GitHub Profile
@poanchen
poanchen / run.py
Created June 11, 2017 19:23
A python program which scans a folder called Monday, in that folder will be text files and each of them will have an email address on the first line. The program will simply send an email using smtp. This snippet of code is used to answer this question on Quora. https://www.quora.com/How-do-I-write-a-python-program-that-scans-a-folder-looks-at-e…
# to run the program
# python run.py
# folders structure
# |->run.py
# |->Monday/
# |->Monday/a.txt
# |->Monday/b.txt
# |->Monday/c.txt
#
# Example of a.txt file: