added production level email config
made slight bug fixes