email code generation through configurations