added a first pass at receiving mail and files. It seems to work.