Update of emailsfromfile.py

Added the possibility to write the output to a file.