store email received at /inbox endpoint

code should probably be moved to its own file at some point, but not sure yet where