Quantum chemistry in the condensed phase: an extended direct reaction field approach