Initial commit of emailServer.php. Some urls and database calls are incomplete.