fixed email functionality, added minimumfilesize and file count checks