Restructuring email process with emailer.py.