Block to accept and send email to specific domains

strpos will return 0 for a positive match at the start of a string, so your condition != false will evaluate as false – in other words…

$email_domain = 'b-mail.online';

if ( strpos( $email_domain, 'b-mail.online' ) != false ) {
    // Will never reach here
}

…this is because != is known as a loose comparison, and 0 == false. You could use a strict comparison e.g. !== false but in this case you don’t even need strpos since you’re checking fully-qualified domain names. Just do something like:

$blocked_domains = [
    'b-mail.online',
    // Other domain names
];

if ( in_array( $email_domain, $blocked_domains, true ) ) {
    $errors->add( 'email_error', '<strong>ERROR</strong>: Domain not allowed.' );
}