Electronic energy transfer in a microcavity