adding email code to service provider registry function