  The $S$-functional calculus for slice hyperholomorphic functions generalizes
the Riesz-Dunford-functional calculus for holomorphic functions to quaternionic
linear operators and to $n$-tuples of noncommuting operators. For an unbounded
closed operator, it is defined, as in the classical case, using an appropriate
transformation and the $S$-functional calculus for bounded operators. This is
however only possible if the $S$-resolvent set of the operator contains a real
point.
  In this paper, we define the $S$-functional calculus directly via a Cauchy
integral, which allows us to consider also operators whose resolvent sets do
not contain real points. We show that the product rule and the spectral mapping
theorem also hold true with this definition and that the $S$-functional
calculus is compatible with polynomials, although polynomials are not included
in the set of admissible functions if the operator is unbounded.
  We also prove that the $S$-functional calculus is able to create spectral
projections. In order to do this, we remove another assumption usually made: we
do not assume that admissible functions are defined on slice domains. Instead,
we also consider functions that are defined on not necessarily connected sets.
This leads to an unexpected phenomenon: the $S$-functional calculi for left and
right slice hyperholomorphic functions become inconsistent and give different
operators for functions that are both left and right slice hyperholomorphic. We
show that any such function is the sum of a locally constant and an intrinsic
function. For intrinsic functions both functional calculi agree, but for
locally constant functions they must give different operators unless any
spectral projection commutes with arbitrary scalars.
