moved config parameters to environment variables
fixed email bug (was unable to render email templates without app context)