Try this. Place it to functions.php of theme.
// Whitelist user email domain
function whitelist_email_domain($user) {
$whitelist_domains = array('gmail.com','hotmail.com');
$email = trim((string)osc_esc_html(Params::getParam('s_email')));
if($email != '') {
$mail_parts = explode('@', $email);
$mail_domain = @$mail_parts[1];
if(!in_array($mail_domain, $whitelist_domains)) {
osc_add_flash_error_message(__('Your mail domain is not allowed, registration process was stoped!', 'theme_name'));
header('Location:' . osc_register_account_url());
exit;
}
}
}
osc_add_hook('before_user_register', 'whitelist_email_domain');