add email sender test and production mode