edited email feature to be compatible with heroku