adding revised mailroomfunction.py