moved email settings to env