added email sending on startup