Modified controller to handle incoming mail