Added the begining workings of building the email file. Copied the logwrite function to be an email write function, writing blocks of information to the email file for eventual delivery