Block any registration that does not use @gmail as mail provider

You can use the setting "Blocked Email Addresses" on wp-admin > Ultimate Member > Settings > Access > Other to block email address on registration. But there is no setting to allow specific email domains.

You can use a code snippet below to set allowed email domains on registration. Just add this code to the file functions.php in the active theme directory. Add email domains you want to allow to the $allowed_email_domains array.

NOTE: We have created this code example to provide guidance and to make it easier for you to implement this code into your website. However, we are not able to provide any support when it comes to customizing the plugin. If you need help implementing this code, please hire a developer.

Example - Error message shown if email address entered to the "E-mail Address" on registration uses email domain that is not allowed.